dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -f -t 120 -c ""关机.···"" ",0 ,true
dim a
do while(a <> "取消关机")
a = inputbox ("关机 ""取消关机"" ","取消关机","取消关机",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox chr(13) + chr(13) + chr(13) + "取消关机"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "成功取消关机~!" 把上面的内容拷贝到文本文档另存为 关机程序.VBS 就OK了