Download Article
A complete guide to crashing your computer with a .bat file
Download Article
For whatever reason, you may want to crash your computer. Using your PC's Notepad app as a platform, you can create a simple .bat (or "batch") file that creates an infinite loop of opening Command Prompt windows; this will rapidly consume your computer's RAM, causing it to temporarily crash. As a general rule, you shouldn't intentionally crash any computer but your own, no matter how temporary the crash is.
How to Crash Your PC
- Open the Notepad app and type “@echo off.”
- Hit “Enter” and type “:crash.”
- Hit Enter again and type “start.”
- Hit Enter again and type “goto crash” as your final line of code.
- Save your file as a batch (.bat) file.
- Right click the file and select “Run as Administrator.”
- Restart your computer to end the crash cycle.
Steps
-
Open the Notepad app. You can do this by typing "Notepad" into the Start search bar and then clicking the pertinent app, or you can access it manually by opening the Start menu, scrolling down to "Windows Accessories", and opening the Notepad app from there.
- You can also right-click your desktop, hover over "New" in the context menu, and select "Text Document".
-
Type @echo off . This is the first line in your batch code; it prevents your .bat file from cutting itself off. [1] X Research source
- You'll need to tap ↵ Enter after each line of code.
Advertisement -
Type :crash . The ":crash" command creates a loop point.
-
Type start for your third line of code. This will prompt your .bat file to open a Command Prompt window.
-
Type goto crash . This is your fourth and final line of code, which will prompt the .bat file to return to the loop point; in this way, your .bat file will continuously open Command Prompt windows, thus eating up your system's RAM.
-
Save your text file as a batch file. Text files have easily-edited file extensions. To set up your file as a .bat file:
- Click "File" in the top left corner of Notepad.
- Click "Save As...".
- Click the "Save as type" field at the bottom of the "Save" window.
- Click "All Files" in the drop-down menu.
-
Name your batch file. You can do this by typing any name into the "File Name" field. Be sure to type ".bat" (excluding the quotes) at the end of whatever name you choose.
- If you can't come up with a name, "mobile.bat" and "cave.bat" are both excellent choices.
-
Click "Save". You are now ready to execute your .bat file!
Advertisement
-
Save any work you have open. While the .bat file won't actually harm your computer, you will have to restart your computer in order to end the .bat cycle. This means that you might lose progress on any work left open and unsaved.
-
Close your browser windows. Again, you'll want to save any work done here before exiting your respective browser windows.
-
Right-click your batch file. This will prompt a context menu.
-
Click "Run as Administrator". This will start running the .bat file; your screen should suddenly be full of duplicating Command Prompt menus.
-
Shut down your computer. Since you won't be able to move your mouse after a few seconds of the .bat running, you'll have to shut down your computer by holding down the power button.
-
Press your computer's power button again. This should start up your computer; you may have to wait for a few seconds after shutting down before restarting.
Advertisement
Community Q&A
Search
-
QuestionCan I use other names besides "mobile.bat"?Community AnswerYes. Like with any other file, you can name it whatever you'd like.
-
QuestionHow come every time I click "run as administrator", it doesn't work and takes me back to Notepad?Community AnswerRight click the batch file, and then click "run." It doesn't need to be "run as administrator."
-
QuestionWill crashing my computer delete any of my files?Community AnswerIt will only delete your unsaved files.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Tips
- Once you're ready to reverse the .bat crash, simply restart the computer to correct any issues.Thanks
- On Windows 10, running the .bat crash will cause several processes in your computer to glitch, thereby boosting your disk activity to nearly 100 percent and slowing down your computer. You can end the relevant processes from within Task Manager ( Alt + Ctrl + Delete ).Thanks
Tips from our Readers
The advice in this section is based on the lived experiences of wikiHow readers like you. If you have a helpful tip you’d like to share on wikiHow, please submit it in the field below.
- If you run the .bat file and it doesn't work, make sure to save your .bat file (example: crash.bat). Run the file as an administrator and there you go!
- The first method opens tons of CMD windows. It might take forever to crash if you have a monster like a Core i5.
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
Warnings
- Make sure all of your work is saved before executing your .bat file.Thanks
- While a batch file is entirely harmless, creating and executing a file designed to crash a computer on any machine other than your own may be met with strict consequences.Thanks
Advertisement
About This Article
Thanks to all authors for creating a page that has been read 490,354 times.
Advertisement