This batch script/file will bomb them by opening applications several times and eventually filling up their diskspace and giving them a hard time closing all the applications that you just opened. This is a harmless prank, which you can try with your friend’s.
If you are wondering what is a batch file is here’s a definition from wikipedia.
A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file.
Let’s start making out batch file. (If you just want the script you can scoll to the bottom)
We will need few thing’s to make our batch file.
> A Windows machine, make sure your friend also has a windows machine because it will only work in windows.
> Notepad -> You can use any text editor of your choice, we will be using notepad because it’s easily available for all.
- First line of our script will be
@echo off
This will stop the script from echoing our command’s to the command prompt.
2. Then we set a variable, that will control the number of times our loop is iterated.
set count=0
Make sure you don’t add space on either side of the ‘=’ sign.
3. We will start our loop with :start
:start
start notepad
start Explorer
Rem add more applications if you want to
set /a count=count+1
if %count%==10 goto end
goto start
:end
Inside the loop, our first command is start notepad, This will open notepad and similarly our second command will start explorer, here our third line is a comment i.e it will not be executed, this is just me telling you that you can add more applications to open if you want to add or maybe if you want to open any other applications in place of notepad and explorer feel free to add them. Moving further we will change the value of our variable count by one, each time we will iterate through the loop. Then we will use an if statement to check if the value is equal to (in this case) 10, you can set the value to any random number you wish, This is the number of times our script will open the applications that we have mentioned. If our variable is equal to 10 then we want our script to end thus the goto end statement, otherwise if count is not equal to 10 we want out script to start again for this we have used goto start.
4. After that we have two more command’s, we will cover them in this point, msg * ha ha Got you !!! will give a pop-up message box with the message ‘ha ha Got you !!!’, and exit will close the command prompt so that by the time they recover from the horror, they won’t have a clue what just happened.
msg * ha ha Got you !!!
exit
We are done our script is ready.
@echo off
set count=0
:start
start notepad
start Explorer
Rem add more applications if you want to
set /a count=count+1
if %count%==10 goto end
goto start
:end
msg * ha ha got you!!!!
exit
Now we can bomb our friend’s, but before that we will need to save out batch file and this is a very important step otherwise our batch file will just be another text file.
> Save your batch file with an extention .bat you can name your file anything you want. I named it applicationbomb.bat, in the screenshot you will see matrix.bat that is because i am too lazy to take another screenshot and edit it. Anyways now when i have already mentioned matrix.bat this is a batch script that gives you a matrix effect on your command prompt, you can check it out if you want to, i just made a tutorial on it before this one. It looks cool you should check it out.
> Your file type should be set to All Files
> Encoding needs to be set to ANSI
That’s it.
Feel free to send your thought’s via DM’s @the_curiousfella on instagram .