代码如下:
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 120 -c ""电脑要关机啦,喊声鹦鹉"" ",0 ,true
dim a
do while(a <> "鹦鹉")
a=inputbox("两分钟就关机,说鹦鹉","你家小鹦鹉强迫你")
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox"主人你真好"
运行效果图: