鸿 网 互 联 www.68idc.cn

当前位置 : 服务器租用 > 服务器相关 > 批处理 > >

定时关机

来源:互联网 作者:佚名 时间:2015-12-13 07:34
一个可以定时关机的.vbs脚本,很简单,不过挺实用 无 restTime =inputbox("请输入关机时间(单位:秒)","定时关机","600")if restTime = "" then wscript.quitDim iSet Tips = CreateObject("WScript.Shell")For i = restTime To 1 Step -30 Con = Tips.popu
一个可以定时关机的.vbs脚本,很简单,不过挺实用 <无>
restTime =inputbox("请输入关机时间(单位:秒)","定时关机","600")
if restTime = "" then wscript.quit
Dim i
Set Tips = CreateObject("WScript.Shell")
For i = restTime To 1 Step -30
    Con = Tips.popup ("当前时间剩余" & i & "秒,每30秒更新一次",30,"计时",2)
    If Con = 3 then wscript.quit
Next
Set Finally = CreateObject("WScript.Shell")
Finally.popup "10秒后关机",1,"计时",0
Set Tips = Nothing
Set Finally = Nothing
set WSHshell = wscript.createobject("wscript.shell")   
WSHshell.run "cmd.exe /c shutdown -s -t 10"
网友评论
<