- 首先在Windows的桌面上新建一个txt文本文档
- 打开文本文档,复制下面这个程序并保存
set ws=createobject("wscript.shell")
h0=int(inputbox("输入关机时"))
m0=int(inputbox("输入关机分"))
do while(1)
h=hour(now)
m=minute(now)
if h0=h then
if m0=m then
ws.run"shutdown -s -t 0"
wscript.sleep 1000
ws.sendkeys"{ }"
exit do
end if
end if
wscript.sleep 1000
loop
- 更改文件后缀名为.vbs就可以运行了。