Joke viruses are simple programs that you can slip on to a friend (or enemy) who will think that their computer has been hacked, infected with a virus, or seriously damaged. Joke viruses can be written in a regular Notepad: you just need to write commands to the file that slow down the computer, disable the operating system, or simply scare the user, and then force him to run this file. Joke viruses can be anything from an annoying nuisance to a disruptive nightmare. The "viruses" in this article are only for harmless jokes, the worst thing they can do is turn off your computer. Attention.
These prank viruses are only for Windows computers, they will not work on Mac OS without special training. Let's start with step 1.
Steps
Method 1 of 3: Writing a Fake Virus that Opens Infinite Windows

Step 1. Launch Notepad
Batch (. BAT) files contain text commands for the computer. To write a BAT file, you do not need a special editor - just Notepad from the standard set of Windows programs. Notepad can be found in the Start menu or in the Accessories submenu. You can also open Notepad by pressing the key combination Win + R, in the text field of the dialog box that appears, type "notepad" and press Enter.

Step 2. Type "@echo off" followed by "CLS" on a new line
By default, BAT files open a command prompt window and display executable commands. The commands "@echo off" and "CLS" prevent the commands from appearing in the command line window, making the reason for the joke invisible to the "victim".

Step 3. Write commands to open multiple (or infinite) windows
Now is the time to write a sequence of commands, executing which, your fake virus will open many windows of different programs once or will open these windows endlessly. It is important to know that if there are a lot of windows open endlessly, the computer may eventually freeze. Read on to learn how to make both types of "virus":
-
To open a definite number of windows, on a new line, type the following command in Notepad: start (program name).
Instead of the phrase in parentheses, enter the name of the program on the victim's computer or or the full name of the executable file. This command instructs the computer to open the specified program window. For example, start iexplore.exe will open an Internet Explorer window. Repeat the "start" command as many times as you like, and your "virus" will open the window as many times as you specify. Here are some programs that you can enter after the start command:
- iexplore.exe - Interent Explorer browser
- calc.exe - Calculator
- notepad.exe - Notepad
- winword.exe - Microsoft Word
-
To open endless number of windows, first on a new line, type : Aincluding the colon. On the next line, type start iexplore.exe (or another program). And finally, on the line below, type goto A.
This sequence of commands will cause the computer to open an Internet Explorer window (or any other program), return to the location just before the window was opened, and then immediately open a new window until the Command Prompt window is closed or the computer freezes.

Step 4. Write a message in the "virus"
For a terrifying effect, you can add a message to the "virus" that will make the user think that something is wrong with his computer. To display a message, start a new line and type echo Your message.
Then on a new line, type pause.
The "pause" command will stop the execution of the "virus" after the message appears.
-
To make your joke believable, write a message similar to the actual error messages, for example: Fatal error. C: // directory is corrupted.
Image Step 5. Save the text as a batch file
When done, from the Notepad menu, select File> Save As …, and then specify the file extension ".bat" (for example, "pinball.bat"). In the File Type drop-down list, select All Files. Save the file somewhere on the victim's computer.
Image Step 6. Force the user to open the file
For your joke to work, you need to get the victim to launch it. This can be accomplished in a variety of ways. One of the most useful ones is to create a shortcut to your batch file and change its icon to something the user actually uses, and then change the name of the shortcut to match the icon. Sit back and watch the results from a comfortable seat!
Method 2 of 3: How to write a. VBS with a bug or hack
Image Step 1. Launch Notepad
As in the previous joke, in this one you need to write a few simple commands in Notepad. However, this time the effect will be different - instead of opening windows, this joke creates several error messages that will make the user think that an error has occurred in his operating system or that the computer has been jailbroken.
Image 2 Type "x = msgbox (" Message Text ", 5 + 16," Message Title ") exactly as specified here, including brackets and quotes, and replace" Message Text "and" Message Title "with the text you want. Windows error dialog with the error message and title you specified. To make your joke believable, use messages and titles that are similar to the real ones. For example, try "Terminal Error" as the title and "In C: / / Users / Windows / system32 critical issue encountered."
- You might want to develop your joke in the direction of hacking. If so, use messages like: “I have full access to your system. Get ready for hacking. " None of this actually happens, so it only works with people who are not good at computers.
- The expression "5 + 16" tells the computer to create a dialog box with a critical error icon and two buttons "Redo" and "Cancel". By changing these numbers, you can get different types of error windows. Just substitute any one-digit number for 5 from the numbers below, and any two-digit number for 16:
- 0 (OK button)
- 1 (OK and Cancel buttons)
- 2 (Undo, Redo and Skip buttons)
- 3 (Yes, No, and Cancel buttons)
- 4 (Yes and No buttons)
- 5 (Repeat and Cancel buttons)
- 16 (Critical error icon)
- 32 (Help Icon)
- 48 (Warning Icon)
- 64 (Information Icon)
Image Step 3. Repeat the error message as often as you like
Repeat the commands above as many times as you like with any error messages. Messages will appear one after another, that is, as soon as the user closes one message, another opens. You can use this fact to create a long message that is increasingly urgent.
Image Step 4. Save the document as a Visual Basic (VBA) file
When you have entered all the messages you want, save the file. From the Notepad menu, choose File> Save As …, name your file with a ".vba" extension. Be sure to select "All Files" from the "File Type" drop-down list. Now, for the joke to succeed, you need to force the "victim" to run this file, for example using the trick from method 1.
Method 3 of 3: Using a pre-written batch file
Image Step 1. Launch Notepad
This joke uses commands from Notepad to force the computer to open programs randomly until the batch file is disabled or the computer freezes. To make this joke, you just need to copy and paste the commands given in this section. but note that this will not work on all computers.
Image Step 2. Copy and paste the following commands:@echo offclsbegingoto% random%: 1start cmd.exegoto begin: 2start mspaint.exegoto begin: 3start pinball.exegoto begin: 4start iexplore.exegoto begin: 5start explorer.exegoto begin: 6start solitaire.exegoto begin: 7start explorer.exegoto begin: 8start edit.exegoto begin: 9start iexplore.exegoto begin: 0start mspaint.exegoto begin
Image Step 3. Modify these commands as you see fit
This code will randomly and endlessly open the programs specified after the word "start". You may have noticed that some programs are repetitive. Change the list of programs as you wish.
- Please note that some of the names of the programs listed above may not be correct for some machines, for example, some computers may not have "pinball.exe". You should double check the correctness of the names of the programs before moving the joke virus to the computer of the "victim".
- If you are in doubt about the name of a program, remember that the exact path of the program is fine too. For example, instead of "iexplore.exe" you can write "C: \ Program Files \ Internet Explorer".
Image Step 4. Save the text as a batch file and run it (if you dare)
Save the file with the extension ".bat" by choosing "All files" from the drop-down list "File type". When you manage to get the user to start it, he will start randomly without stopping to open programs on the computer.
-
To make it more fun, try replacing '*.exe' in one of the commands with the full path to some user document. For example, 'start C: \ Documents \ 123.doc' will open the 123.doc document from the Documents folder in the default editor, and
edit (full filename)
goto begin
will open the specified file in a DOS text editor. It will look like a hacker is reading personal documents. Remember that file names containing spaces must be enclosed in quotation marks!
Image Step 5. Examine the meanings of the commands to modify your jokes
Even if you don't understand how they work, joke viruses can be good fun. But it will be even more fun for you if you understand what happens when they run, and when you understand how these "viruses" work, you can write your own! Here is a list of the commands used in this article, along with a brief description:
- @echo off - disable command output.
- cls - clear command line screen. The command line will look neater.
- goto A - go to label A.
- % random% is a Windows variable that generates random numbers between 0 and 9 (inclusive).
- : (number, letter or word) - label. You can go to it using the "goto" command.
- Note: in the example above, we have 10 labels. If we omit one number, the program will close if% random% generates that number.
Advice
- Here is a sample of one of the most annoying programs and its code:
@echo off
: a
start notepad
goto a
All it does is open Notepad an infinite number of times until the user closes the command prompt window. Do not run it on your computer unattended - it may end badly.
This is a simplified version of Method 1 discussed above.
- Experiment with different commands! If you want to make a joke malicious, use a command that deletes files or erases data from your hard drive.
Warnings
- You may have problems using malicious batch files or corrupting school or public computers. Unauthorized sending of such files over the Internet or recording them into public systems is prohibited.
- Don't overdo it. 10 copies of something like Pinball is very annoying. Hundreds of copies can freeze your computer and take away some work.