谁能教我VB语言

来源:百度知道 编辑:UC知道 时间:2024/06/30 17:22:56
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""说我是猪,不说我是猪就一分钟关你机,不信,试试···"" ",0 ,true
dim a
do while(a <> "我是猪")
a = inputbox ("我是猪,就不关机,快撒,说 ""我是猪"" ","说不说","不说",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,猪" 这是什么

你的这个是vbs脚本,如果你运行它,会叫你说你是猪,那么你就将就下,输入我是猪,之后完事。否则会60秒后关机。你打开运行,输入shutdown -a回车,就不会关机了。。。
这东西关键就在这一句:“WSHshell.run "cmd.exe /c shutdown -a",0 ,true ”

VB已经淘汰,我教你C#吧

C# 马上就完蛋了,我叫你 D@ 吧