#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
FileInstall("123.jpg", @TempDir & "\123.jpg", 1)
$Form1 = GUICreate("更改密码", 382, 284, -1, -1, $ws_popup)
$Pic1 = GUICtrlCreatePic(@TempDir & "\123.jpg", 0, 0, 382, 284, $SS_CENTERIMAGE)
$ss1 = GUICtrlCreateLabel("为 " & @UserName & " 设置密码", 0, 0, 355, 28, "", $GUI_WS_EX_PARENTDRAG)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0xffffff)
$ss2 = GUICtrlCreateLabel("", 355, 0, 27, 28)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$input1 = GUICtrlCreateInput("", 140, 38, 230, 24)
GUICtrlSetFont(-1, 14, 400)
$input2 = GUICtrlCreateInput("", 140, 68, 230, 24)
GUICtrlSetFont(-1, 14, 400)
$ss3 = GUICtrlCreateLabel("", 195, 247, 75, 25)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$ss4 = GUICtrlCreateLabel("", 112, 247, 75, 25)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ss2
Exit
Case $ss3
Exit
Case $ss4
If GUICtrlRead($input1) == GUICtrlRead($input2) Then
GUISetState(@SW_HIDE)
_RunDOS("net user " & @UserName & " " & GUICtrlRead($input1))
$box = MsgBox(64 + 4, "提示", "密码修改成功!是否立即启动计算机?")
If $box = 6 Then _RunDOS("shutdown -r -t 0")
Exit
Else
MsgBox(64 + 0, "错误提示", "两次输入的密码不一致,请重新输入!")
EndIf
EndSwitch
WEnd
重新修改的,图片放到脚本目录下编译就好了