win2000关机命令的批处理bat
更新时间:2007年08月09日 10:37:00 作者:
win2000关机命令的批处理bat,主要是通过间接生成vbs,达到关机功能
复制代码 代码如下:
@echo off
setlocal
cd/d %temp%
echo Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem") >shutdown.vbs
echo For Each objOperatingSystem in colOperatingSystems >>shutdown.vbs
echo ObjOperatingSystem.Win32Shutdown(12) >>shutdown.vbs
echo Next >>shutdown.vbs
cscript shutdown.vbs
del shutdown.vbs
::;Value Meaning
::;0 Log Off
::;0 + 4 Forced Log Off
::;1 Shutdown
::;1 + 4 Forced Shutdown
::;2 Reboot
::;2 + 4 Forced Reboot
::;8 Power Off
::8 + 4 Forced Power Off
pause
dos下重启
复制代码 代码如下:
ECHO G=FFFF:0000 | DEBUG
您可能感兴趣的文章:
相关文章
bat中errorlevel与%errorlevel%的区别
这篇文章主要介绍了bat中errorlevel与%errorlevel%的区别,需要的朋友可以参考下2014-05-05
最新评论