定时关机

dim s
dim x
set w=createobject("wscript.shell")
s=inputbox("请输入时间如 1:13:15","迷你定时关机!")
if s<>"" then
do 
x=right(now(),8)
wscript.sleep 1000
if x=s then
w.run "shutdown -s -t 60"
end if
loop while x<>s
end if
if s="" then
w.run "shutdown -a"
end if

你可能感兴趣的:(定时关机)