![Windows 變更使用者密碼 GUI.ahk](https://rvso.com/image/1497084/Windows%20%E8%AE%8A%E6%9B%B4%E4%BD%BF%E7%94%A8%E8%80%85%E5%AF%86%E7%A2%BC%20GUI.ahk.png)
是否有一個 Windows 命令(透過命令列發送)可以打開「更改密碼」窗口,如下所示。
答案1
答案2
答案3
我用了自動熱鍵為了這。
將變數更改user
為目標用戶。
儲存檔案並在啟動資料夾中建立該檔案的捷徑。
每行末尾都有註釋以;
供解釋。
Windows 變更使用者密碼 GUI.ahk
#NoEnv
SetWorkingDir %A_ScriptDir%
#Warn
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
SetTitleMatchMode Fast
DetectHiddenWindows Off
DetectHiddenText On
#WinActivateForce
#NoTrayIcon
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
#Persistent
#MaxThreadsPerHotkey 2
WindowsChangeUserPasswordGUI:
user := "Administrator" ; user
WinGetTitle, title, A ; Active Window Enable On Top
WinGetClass, class, A ; Active Window Enable On Top
WinGet, exe, ProcessName, A ; Active Window Enable On Top
WinSet, AlwaysOnTop, On, %title% ahk_class %class% ahk_exe %exe% ; Active Window Enable On Top
Run, netplwiz ; User Accounts
WinWait, User Accounts ahk_class #32770 ahk_exe netplwiz.exe ; User Accounts
WinSet, Transparent, 0, User Accounts ahk_class #32770 ahk_exe netplwiz.exe ; Make User Accounts Window Transparent (Not Visible)
WinSet, AlwaysOnTop, Off, %title% ahk_class %class% ahk_exe %exe% ; Active Window Disable On Top
ControlSendRaw, SysListView321, %user%, User Accounts ahk_class #32770 ahk_exe netplwiz.exe ; Select Specified User
ControlGet, selected, List, Selected, SysListView321, User Accounts ahk_class #32770 ahk_exe netplwiz.exe ; Get Selected User
selected := RegExReplace(selected, "\t.*", "") ; Get Pure User Name, Remove User Groups
ControlClick, Button6, User Accounts ahk_class #32770 ahk_exe netplwiz.exe,, Left, 1, NA ; Reset Password Button
WinWait, Reset Password ahk_class #32770 ahk_exe netplwiz.exe ; Reset Password
WinSetTitle, Reset Password ahk_class #32770 ahk_exe netplwiz.exe, , Reset Password %selected% ; Set Window Title Reset Password User
WinGetPos, passX, passY, passW, passH, Reset Password ahk_class #32770 ahk_exe netplwiz.exe ; Get Window Position Of Reset Password
x := (A_ScreenWidth - passW) / 2 ; Set The Coordinates For Screen Center
y := (A_ScreenHeight - passH) / 2 ; Set The Coordinates For Screen Center
WinMove, Reset Password ahk_class #32770 ahk_exe netplwiz.exe,, %x%, %y% ; Move Reset Password Window To Screen Center
WinWaitClose, Reset Password ahk_class #32770 ahk_exe netplwiz.exe ; Wait For Reset Password Window To Close
WinClose, User Accounts ahk_class #32770 ahk_exe netplwiz.exe ; Close User Accounts Window
ExitApp ; ExitApp
Return
答案4
我不再在任何 Windows 電腦上看到 password.cpl;它可能已被棄用。然而,這個晦澀的命令似乎仍然可以用來啟動密碼對話框:
C:\Windows\explorer.exe shell:::{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}
希望它對您有用。