How to Crash PC with Command Prompt

How to crash PC with Command Prompt? In this post, we’ll show you how to crash your computer using a batch file, and if you just want to wipe your system, you can check a handy tool to wipe system disk to quickly get rid of your OS.

Lucas

By Lucas / Updated on February 17, 2025

Share this: instagram reddit

Can you crash PC with Command Prompt?

You can crash your PC with command but not in Command Prompt. You can force a System Crash from the Debugger.

Kernel-mode debugging can induce a system meltdown if KD or WinDbg are employed. This is accomplished by executing the .crash (Force System Crash) command in the Command Prompt. (After this, execute the g (Go) command if the target computer does not crash promptly.)

The system will invoke KeBugCheck and generate bug check 0xE2 (MANUALLY_INITIATED_CRASH) when this command is executed. A crash dump file is generated at this juncture unless crash dumps have been disabled.

The kernel debugger on the host computer will be notified and can be employed to actively debug the crashed target after the crash log file has been written.

Steps: How to crash PC with Command Prompt

So, you can crash your PC with the .crash command. Now, we’ll show you all steps to crash your PC. Keep cautious.

Part 1. Create a batch file

Step 1. Open the Notepad app. You can do this by typing "Notepad" into the Start search bar and then clicking the pertinent app.

Step 2. Type @echo off. This is the first line in your batch code; it prevents your .bat file from cutting itself off. You'll need to tap ↵ Enter after each line of code.

Step 3. Type :crash. The ":crash" command creates a loop point.

Step 4. Type start for your third line of code. This will prompt your .bat file to open a Command Prompt window.

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.

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:

  1. Click "File" in the top left corner of Notepad.
  2. Click "Save As...".
  3. Click the "Save as type" field at the bottom of the "Save" window.
  4. Click "All Files" in the drop-down menu.

Step 7. 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.

Step 8. Click "Save". You are now ready to execute your .bat file!

Part 2. Executing batch file to crash PC with Command Prompy

Step 1. Save any work you have open. While the .bat file won't harm your computer, you will have to restart your computer to end the .bat cycle. This means you might lose progress on any open and unsaved work.

Step 2. Close your browsers. Once more, you should save any work completed here before closing your browser windows.

Step 3. 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.

Step 4. 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.

Now, press your computer's power button again. This should start your computer; you may have to wait a few seconds after shutting down before restarting.

Further reading: Wipe your Windows system while your PC is running

If you just want to wipe your Windows system, you don’t need to use complex command via Command Prompt. Although DiskPart or Disk Management doesn’t allow you to wipe the system hard drive, but if you want to comprehensively wipe your Windows OS, you can try AOMEI Partition Assistant, a powerful tool that makes this process straightforward and secure.

It is a disk management software that is renowned for its user-friendly interface and robust capabilities. AOMEI Partition Assistant can be employed to create a bootable media and subsequently launch from it to completely erase the PC. In such cases, the system partition that contains the operating system would be reclassified as a data drive, enabling it to be readily wiped.

Step 1. Install and launch AOMEI Partition Assistant. Click the "Tools" main tab and select "Make Bootable Media". Follow the instructions to finish the creation.

Make Bootable Media

Step 2. Boot your PC from the bootable USB, and you will be brought to the interface of AOMEI Partition Assistant. Click the "Wipe" main tab and select the "Wipe Hard Drive" option.

Wipe Hard Drive

Step 3. Select the disk you want to wipe and click "OK" to continue.

Select Disk

Step 4. Select a wiping method to wipe the selected hard drive and click "OK". By default, the wiping method is Fill in 0.

Fill Sectors With Random Data

Features of other 3 methods:
Fill sectors with random data: wipe the partition and overwrite existing contents with random data.
DoD 5220.22-M: Overwrite all addressable locations with binary zeroes firstly; secondly with binary ones; thirdly with a random bit pattern.
Gutmann: Overwrite the partition with a random character for the first 4 and the last 4 passes and overwrite from pass 5 through pass 31 with a complex pattern.

Step 5. Return to the main user interface, check the pending operation, and click “Apply” >"Proceed".

Apply Wipe Hard Drive

To sum up

Now you know how to crash PC with Command Prompt. The commands may be a little complex for many users, however, if you just want to remove your Windows OS, you can choose an easier way. AOMEI Partition Assistant is an all-in-one disk manager for all Windows systems. To wipe the system, you don't have to run commands, this tool will be more handful.

Besides, you can use this tool to clone your disk if you only want to clean your system disk and replace the old disk. What's more, you can resize/format/delete all your partitions even recovery partitions via this tool. 

Lucas
Lucas · Staff Editor
I prefer peaceful and quiet life during vacation,but sometimes I watch football match if my favorite club performs brilliantly in that season. And I love reading, painting and calligraphy, thus I send my friends festival handwriting cards every year.