VBS代码有那些

来源:百度知道 编辑:UC知道 时间:2024/05/14 02:32:26
那能告诉我重启的代码吗

????这是什麽问题??????
VBS是一种脚本语言

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next