直接让Windows注销的脚本

将以下代码保存为一个.vbs文件,双击运行即可注销windows:

Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next

你可能感兴趣的:(windows,脚本)