loading
 Hi, i have only recently discovered this great site, and i decided to make my first own instructable :D.
I'm going to show you how to make a simple funny prank, meaning that a friend of you would try to open a normal program, and then a pop up would come up telling him a virus has infected his computer and that he has to delete all his files. I assure you that it will do absolutely nothing to your, or your friends PC.

Step 1: Making the "virus"

 First, open up notepad, and then just copy-paste this code in between the lines (without the lines included of course) :

____________________________________________________________________________
Msgbox "Your computer has been infected by a virus",16,"Warning !"
dim x,yes,no
x=Msgbox("Virus has infected hard drive (C:). Deletion of the virus will require complete formatting of hard drive (C:). Would you like to format hard drive (C:) ?",52,"Warning !")
if x=6 then
dim box
box=Msgbox("Hard drive (C:) formatting complete. In order to function correctly your computer must restart, would you like to restart now ?",36,"Formatting has been completed")
if box=6 then
Msgbox "Fatal error, code 08x48631643.B-7",16,"ERROR"
Msgbox "Just kidding, this was all a joke, but i did scare you didn't I ? Héhé...",64,"Made by GillesM95"
end if
if box=7 then
Msgbox "Fatal error, code 08x48631643.B-7",16,"ERROR"
Msgbox "Just kidding, this was all a joke, but i did scare you didn't I ? Héhé...",64,"Made by GillesM95"
end if
end if
if x=7 then
Msgbox "Fatal error, code 08x48631643.B-7",16,"ERROR"
Msgbox "Just kidding, this was all a joke, but i did scare you didn't I ? Héhé...",64,"Made by GillesM95"
end if
___________________________________________________________________________

Then save this file somewhere where your "victim" won't see it
you have to save it as a .vbs file, not .txt

For example : click File -> save as -> go to your folder of choice -> name it
example.vbs
below that, it will say : save as : text file (.txt.)
you have to change that to All files (*.*)
Then save your file
If you don't completely understand just look at the picture below and you'll understand.

Step 2: Explanation of the Previous Step

 If you don't want to know how it all works, you can just skip this step, it's for people who
would like to experiment with it.

I'm explaining line per line

Line 1 : Msgbox "Your computer has been infected by a virus",16,"warning !"
construction : Msgbox "Message",0,"Title"
Msgbox -> tells the computer to make a pop up
"Message" -> the message that will appear in the pop up
"title" -> the pop up's title
0 -> this numbers decides what the pop up will look like
it controls two things : How many and what sort of buttons there will be (like yes,no,ok,cancel,..) and what symbol will be next to the message (question mark, I for info, an exclamation mark for an error or a big red X, also an error)

Here is a list of all the numbers and there outcomes :
numbers for buttons :
- OK -> 0
- OK and CANCEL -> 1
- ABOUT, RETRY and IGNORE -> 2
- YES, NO and CANCEL -> 3
- YES and NO -> 4
- RETRY and CANCEL -> 5                                              To combine buttons and icons simply make 
numbers for icons                                                               the sum of the numbers
- Critical message (Red X) -> 16
- Warning Query (?) -> 32
- Warning Message (!) -> 48
- Information message (i) -> 64

Line 2 : dim x,yes,no
dim means that the person seeing the pop up will have a choice between multiple buttons, here yes and no, x is the variable

Line 3
just another pop up, like line 1, with the question and the buttons you chose

The next part ( line 4 till 19 ) i'm going to explain with a different example :

code :

dim x,yes,no
x=Msgbox("Would you like to install a virus ?",36,"Question"
if x=6 then
Msgbox "You have installed a virus",0,"Made by GillesM95"
end if
if x=7 then
Msgbox "You have not installed a virus",0,"Made by GillesM95"
end if

By entering this code and saving it as a .vbs file, and then open it a pop up will appear saying :
Would you like to install a virus ? with 2 buttons : Yes or no
By pressing yes, a pop up will appear saying : you have installed a virus
By pressing no, a pop up will appear saying : you have not installed a virus

Now the explanation ( it think its pretty easy to understand)

Line 1 we already know

Line 2 we already know

Line 3 : if x=6 then
In lines like this, numbers have different meanings then before, here we have : 
1 = OK
2 = CANCEL
3 = ABORT
4 = RETRY 
5 = IGNORE
6 = YES
7 = NO
Now that we know that, we can understand the meaning of this line : it tells the computer that IF x = 6 ( if the person clicks yes) the computer has to ececute what comes on line 4

Line 5 : end if
this tells the computer where to stop , for example, if he clicks yes, the message on line 4 has to pop up and then it has to stop

Line 6 - 8
The same, but with the other option , no
 












Step 3: Finishing the Prank

 Now that you have your file, it's time to make someone open it !
How do we do this ? Go to your desktop, right click and select new -> shortcut
Make a shortcut to your file and name it like a normal program, for example Internet Explorer
Now here's the interesting part. When your shortcut is ready, right click it, and select Properties.
At the bottom, select : change icon
You will now get a list of icons, including the Internet Explorer icon.
Just change it to that icon, and no one will see the difference !

Note : I don't take any responsibility for anything you may do wrong by changing the code or adding things that i haven't mentioned. If you don't change anything (exept maybe the text in the pop ups) nothing can  go wrong.

Note : This is just a small prank, but i will be posting some others in the future.

Still have a question ? feel free to comment, positive comments are also welcome of course :) Have fun !
try this,<br>without the lines<br>_____________________________________________________________<br>Msgbox &quot;Your computer has been infected by a virus&quot;,16,&quot;Warning !&quot;<br>dim x,yes,no<br>x=Msgbox(&quot;Virus has infected hard drive (C:). Deletion of the virus will require complete formatting of hard drive (C:). Would you like to format hard drive (C:) ?&quot;,52,&quot;Warning !&quot;)<br>if x=6 then<br>dim box<br>box=Msgbox(&quot;Hard drive (C:) formatting complete. In order to function correctly your computer must restart, would you like to restart now ?&quot;,36,&quot;Formatting has been completed&quot;)<br>if box=6 then<br>Set WSHShell = WScript.CreateObject(&quot;WScript.Shell&quot;)<br>WshShell.Run &quot;C:\WINDOWS\system32\shutdown.exe -r -t 0&quot;<br>Msgbox &quot;Fatal error, code 08x48631643.B-7&quot;,16,&quot;ERROR&quot;<br>Msgbox &quot;Just kidding, this was all a joke, but i did scare you didn't I ? H&eacute;h&eacute;...&quot;,64,&quot;Made by GillesM95&quot;<br>end if<br>if box=7 then<br>Msgbox &quot;Fatal error, code 08x48631643.B-7&quot;,16,&quot;ERROR&quot;<br>Msgbox &quot;Just kidding, this was all a joke, but i did scare you didn't I ? H&eacute;h&eacute;...&quot;,64,&quot;Made by GillesM95&quot;<br>end if<br>end if<br>if x=7 then<br>Msgbox &quot;Fatal error, code 08x48631643.B-7&quot;,16,&quot;ERROR&quot;<br>Msgbox &quot;Just kidding, this was all a joke, but i did scare you didn't I ? H&eacute;h&eacute;...&quot;,64,&quot;Made by GillesM95&quot;<br>end if<br>_____________________________________________________________<br>this will do the regular but if you click yes when it prompts you to restart it will restart your computer
sorry it doesnt work but if you have any suggestions post them

About This Instructable

21,596views

5favorites

License:

More by GillesM95:Simple yet funny prank with a VBScript 
Add instructable to: