How to Crash Your Computer Using a Batch File

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.

Part 1
Part 1 of 2:

Creating Your Batch File

Download Article
  1. How.com.vn English: Step 1 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".
  2. How.com.vn English: Step 2 Type @echo off.
    This is the first line in your batch code; it prevents your .bat file from cutting itself off.[1]
    • You'll need to tap Enter after each line of code.
    Advertisement
  3. How.com.vn English: Step 3 Type :crash.
    The ":crash" command creates a loop point.
  4. How.com.vn English: Step 4 Type start for your third line of code.
    This will prompt your .bat file to open a Command Prompt window.
  5. How.com.vn English: Step 5 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.
  6. How.com.vn English: Step 6 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.
  7. How.com.vn English: Step 7 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.
  8. Step 8 Click "Save".
    You are now ready to execute your .bat file!
  9. Advertisement
Part 2
Part 2 of 2:

Executing Your Batch File

Download Article
  1. How.com.vn English: Step 1 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.
  2. How.com.vn English: Step 2 Close your browser windows.
    Again, you'll want to save any work done here before exiting your respective browser windows.
  3. How.com.vn English: Step 3 Right-click your batch file.
    This will prompt a context menu.
  4. Step 4 Click "Run as Administrator".
    This will start running the .bat file; your screen should suddenly be full of duplicating Command Prompt menus.
  5. How.com.vn English: Step 5 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.
  6. How.com.vn English: Step 6 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.
  7. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Can I use other names besides "mobile.bat"?
    How.com.vn English: Community Answer
    Community Answer
    Yes. Like with any other file, you can name it whatever you'd like.
  • Question
    How come every time I click "run as administrator", it doesn't work and takes me back to Notepad?
    How.com.vn English: Community Answer
    Community Answer
    Right click the batch file, and then click "run." It doesn't need to be "run as administrator."
  • Question
    Will crashing my computer delete any of my files?
    How.com.vn English: Community Answer
    Community Answer
    It will only delete your unsaved files.
See more answers
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.
      • 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).
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • Make sure all of your work is saved before executing your .bat file.
      • 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.
      Advertisement

      About This Article

      How.com.vn English: Jack Lloyd
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for How.com.vn. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 462,405 times.
      How helpful is this?
      Co-authors: 36
      Updated: March 4, 2024
      Views: 462,405
      Categories: Hacks
      Thanks to all authors for creating a page that has been read 462,405 times.

      Reader Success Stories

      • How.com.vn English: Landon A.

        Landon A.

        Nov 21, 2022

        "Drove Nana nuts, and crashed my old XP media center pC, and taught me how to write a simple program. It's a..." more
        Rated this article:
      Share your story

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement