定时关机

2019-06-19 20:03栏目:技术创新

新浦京娱乐场官网,一个可以定时关机的.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"
#该片段来自于http://outofmemory.cn

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:定时关机