定時にシャットダウン

一つ定時にシャットダウンvbsスクリプトです、非常に単純ですが、すごく便利です。

vbstmshutdown.sh

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"

Source

Posted by arkgame