timestr = InputBox("请输入延时时间(小时)","关机时间")
if(timestr<>"") then
shutdownbut = msgbox("是否确定在"+timestr+"个小时后关机",vbOKCancel,"提示")
if shutdownbut=vbOK then
tm = (0)
'tm = (timestr*3600)
msgbox "系统将在"+timestr+"小时后关机",vbOKOnly+VbExclamation,"提示"
CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -t "&cstr(tm)
else
msgbox "取消了关机",vbOKOnly+vbinformation,"提示"
end if
end if
if(timestr<>"") then
shutdownbut = msgbox("是否确定在"+timestr+"个小时后关机",vbOKCancel,"提示")
if shutdownbut=vbOK then
tm = (0)
'tm = (timestr*3600)
msgbox "系统将在"+timestr+"小时后关机",vbOKOnly+VbExclamation,"提示"
CreateObject("Wscript.Shell").run "cmd.exe /c shutdown -s -t "&cstr(tm)
else
msgbox "取消了关机",vbOKOnly+vbinformation,"提示"
end if
end if