VBS脚本改windows帐户密码,已测
1.Change Password(Administrator)
dim temp
temp = msgbox("Are you sure?",vbOkCancel,"title")
If temp=vbOk Then
dim password
password=inputbox("请严格按照要求公司密码规定更改密码:","请输入您需要更改的密码","Ckt2012It",1024,768)
set shell=createobject("wscript.shell")
'Administrator
shell.run "net user administrator " & password
if password=test Then
msgbox "密码修改失败" & vbCrLf & "初始化密码为" & vbCrLf & "test",VbCritical,"错误报告"
Else
msgbox "密码修改成功" & vbCrLf & "新密码为" & vbCrLf & password,vbInformation,"恭喜!密码修改成功!"
End if
End if
2.Change Password(Operrator)
dim temp
temp = msgbox("Are you sure?",vbOkCancel,"title")
If temp=vbOk Then
dim password
password=inputbox("请严格按照要求公司密码规定更改密码:","请输入您需要更改的密码","Tuo123",1024,768)
set shell=createobject("wscript.shell")
'Administrator
shell.run "net user Operator " & password
if password=test Then
msgbox "密码修改失败" & vbCrLf & "初始化密码为" & vbCrLf & "test",VbCritical,"错误报告"
Else
msgbox "密码修改成功" & vbCrLf & "新密码为" & vbCrLf & password,vbInformation,"恭喜!密码修改成功!"
End if
End if