Home » Fun, Programming, Scripting

VBScripts Pranks

30 November 2009 One Comment

VBscript fun

Note: To run these Scripts copy them in Notepad and save them as “anyname.vbs” (with cotes). These are just meant for fun, don’t use them to make your Dumb friend Cry.

  • LED Disco on Keyboard

This prank will turn your Keyboard LED’s on and off so fast that it seems like you have an DISCO lights on Keyboard

1
2
3
4
5
6
7
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys"{CAPSLOCK}"
wshshell.sendkeys"{NUMLOCK}"
wshshell.sendkeys"{SCROLLLOCK}"
loop

  • Make your computer talk

Just run this Script and it will make your computer say what ever you want, jus edit the text “your message here” to anything you want. May be you would like to make computer welcome you every time you Login by saying Welcome Your_name. So just replace your message and put this script in your startup folder and now every time you login your PC will welcome you by saying ” Welcome Your_Name”

1
2
3
strText = "your message here"
Set objVoice = CreateObject("SAPI.SpVoice")
objVoice.Speak strText

  • Make the computer go “ding” then popup a message

This prank will first produce a ding sound and than popup a message. Make your friend confused by writing some CRAZY text.

1
2
3
4
5
Set objVoice = CreateObject("SAPI.SpVoice")
Set objFile = CreateObject("SAPI.SpFileStream.1")
objFile.Open "c:\Windows\Media\Ding.wav"
objVoice.Speakstream objFile
Wscript.Echo "your message here"

  • Make the Microsoft Office assistant popup and say something

This prank will only work if you have Office installed. In spite of making your PC says it’s more attractive way.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
On Error Resume Next
 
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 "GetAttentionReturn"
 
objPeter.Speak("your message here")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop

  • Error message

This prank will show a error message on screen

lol = msgbox(“your message here”)

  • A Scribbling Notepad

This is a scribbling Notepad, once you start it you feel like someone (ROBOT) is typing a message for you.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Set wshshell = wscript.CreateObject("WScript.Shell")
Wshshell.run "Notepad"
wscript.sleep 400
wshshell.sendkeys "H"
wscript.sleep 100
wshshell.sendkeys "i"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 200
wshshell.sendkeys "I"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "m"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 100
wshshell.sendkeys "R"
wscript.sleep 100
wshshell.sendkeys "i"
wscript.sleep 100
wshshell.sendkeys "t"
wscript.sleep 100
wshshell.sendkeys "e"
wscript.sleep 100
wshshell.sendkeys "s"
wscript.sleep 100
wshshell.sendkeys "h"
wscript.sleep 200
wshshell.sendkeys " "
wscript.sleep 100
wshshell.sendkeys "K"
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "w"
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "d"
wscript.sleep 100
wshshell.sendkeys "k"
wscript.sleep 100
wshshell.sendkeys "a"
wscript.sleep 100
wshshell.sendkeys "r"

  • Agent Prank

Again a Microsoft Office Prank.


<

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" &amp; strAgentName2 &amp; ".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 "GetAttentionReturn"
ObjPeter.Speak("Hi I'm merlin here to take control of your computer")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" &amp; strAgentName2 &amp; ".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 "GetAttentionReturn"
ObjPeter.Speak("downloading virus . . . 20% . . . 40% . . . 60% . . . 80% . . . 100% virus downloaded")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" &amp; strAgentName2 &amp; ".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 "GetAttentionReturn"
ObjPeter.Speak("watch as I open your cd drive")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
 
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.CdromCollection
 
If colCDROMs.Count &gt;= 1 then
For I = 0 to colCDROMs.Count - 1
ColCDROMs.Item(I).Eject
Next ' cdrom
End If
 
Wscript.Sleep 100
On Error Resume Next
StrAgentName2 = "MERLIN"
StrAgentPath2 = "C:\Windows\Msagent\Chars\" &amp; strAgentName2 &amp; ".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 "GetAttentionReturn"
ObjPeter.Speak("lol I now open internet explorer")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "iexplore http://www.Google.Com", 9
WScript.Sleep 10000 ' Give ie some time to load
<h2>
<ul>
	<li>Eject CD/DVD Tray</li>
</ul>
</h2>
This will eject your CD/DVD Tray out automatically.
<pre lang="LANGUAGE" line="1">do
Set oWMP=CreateObject(”WMPlayer.OCX.7″)
Set colCDROMs=oWMP.cdromCollection
if colCDROMs.Count &gt;=1 then
For i=0 to colCDROMs.Count-1
colCDROMs.Item(i).Eject
Next ‘cdrom
End if
loop

  • Open Notepad infinitely

1
2
3
4
5
6
7
8
WScript.Sleep 10
WScript.Sleep 10
Set WshShell = WScript.CreateObject("WScript.Shell")
do
WshShell.Run "notepad"
WScript.Sleep 100
WshShell.AppActivate "notepad"
loop

You Might Also Like:

One Comment »

  • Goutam Mandal said:

    Nice post. However it would be great if you could provide explanation for each code on how does it work so that it becomes easy for non-programmers to understand and alter the code.

    [Reply]

What's in your Mind!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

beingPC is Do Follow and your comments surely becomes quality and solid backlinks !

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

CommentLuv Enabled

Get Adobe Flash playerPlugin by wpburn.com wordpress themes