This Instructable will show you how to write a VB (Visual Basic) Script that will open and close a persons CD/DVD Drive at random intervals.
Disclaimer:
1) This script runs best on Windows XP (Perfect for the office!), but Vista and 7 have the security checking software that will ask for permission for a script to run.
2) The script also works best on desktop computers, as the close command will not work on a drive without a motor in it.
3) There is no malicious code in the script, but I hold no responsibility for what could happen if it gets changed from the original code sample.
Remove these ads by
Signing UpStep 1: Locate A Target
1) If you work for an IT Department this will be easy, as you can really just set anyone up to be pranked at your will, and wait for the calls to come in.
2) If you don't work in an IT Department, choose someone who would be unaware of tampering to their computer.
3) Try not to pick anyone with too much seniority as I cannot guarantee that they wont be angry about you messing with their computer.

































Visit Our Store »
Go Pro Today »




is there a way to make it use less CPU power
so it's not noticeable?
thanks
Dim theRandom
Dim count
' Randomize a number then turn it into minutes
while (count < 3) The number 3 is how many times it will open,
if you change that number it will run the open more times
theRandom = RandomValue()
Pause (theRandom * 60)
OpenCDRom
count = count + 1
wend
Function RandomValue()
dim theRandom
dim ubound
dim lbound
ubound = 99 The ubound and lbound are (in minutes) how long it will take
lbound = 20 randomly for the drive to open (ubound has to be higher)
If you need anything else let me know!