Microsoft is trying to mold Windows 11 into a perfectly clean OS but bugs always seem to get the better of it. One such issue is Command Prompt crashing on Windows 11. The native app randomly shows up and crashes when you’re dealing with some other application. Otherwise, when you exclusively access the command prompt in Windows 11, it would open but get unresponsive and then crash
Strangely, users who have reported such a snag have also mentioned that other times the command prompt works quite smoothly. In this guide, I have mentioned some of the possible reasons that may be causing the error. Also, I have listed the troubleshooting methods that can help you fix the issue of command prompt crashing on Windows 11.
Why Command Prompt is Crashing on Windows 11
- Corrupted system file on the device.
- There may be a bug on the current Windows 11 build installed on your PC.
- It may happen due to the presence of some malware on the computer.
- An environment variable is missing from the path that is usually assigned to command Prompt to open.
- The command prompt on Windows 11 is crashing due to the autorun crypto-mining key.
1. Reboot the Computer
It’s always a good idea to restart your PC for it may be a minor software issue causing the command prompt to mess up.
- Hit the Windows key.
- From the dialog box that pops up click on the power icon.
- Then click on Restart from the menu that shows up.
In most cases, users have reported that only rebooting their computer solved the issue of Windows 11 command prompt crash.
2. Update Windows OS Build
Bugs still haunt the Windows OS even though it has stepped up to new Windows 11. Microsoft is regularly rolling updates to fix the bugs that are rendering various apps and services useless on the computers.
To look for the new update that is available for your computer,
- Press Windows + I to open the Windows settings.
- Then click on Windows Update.
- Next, click on Check for Updates.
- If a fresh update is available you will be prompted to download and install the same.
- To install a Windows update, click on Download Now button beside the update build description.
After updating check if you are still facing the crashing of command prompt on your Windows 11 computer.
3. Remove the Crypto Mining Autorun Key
Crypto-mining is the new fad but it also brings its fair share of malware. One of them is known as SoundMixer. It is an autorun key that messes around with the registry and creates unauthorized modifications.
This is what leads to the command prompt not working on Windows 11. This issue can be fixed though.
- Open the Registry Editor by invoking the run dialog box Win + R.
- Then navigate to the menubar and click on Edit.
- From the dropdown menu click on Find.
- In the Find field, type SOUNDMIXER.[make sure the three options are checked]
- Two things will happen now. Either the search result will find out the SOUNDMIXER autorun key or it won’t.
- Fortunately, on my PC I did not find the SOUNDMIXER even after repeated searches.
- In case, you find the folder SOUNDMIXER located after performing the find action, then open that folder in the registry itself.
- Once you expand it, you will see a registry entry autorun. Simply delete it.
- Just to confirm, you can repeat the above steps to check if the SOUNDMIXER has found its way into other locations.
Note that, the autorun key can be present randomly. Only by using the Find action, you can locate it.
As a pro tip, I will suggest that if you are dabbling with crypto mining then make sure your computer is free from malware. Timely run full Windows Defender scan or use whatever other third-party anti-virus you have installed on your PC.
4. Fix the Corrupt System Files
There are certain system files, which when get corrupted will affect how the other apps work on a computer.
- if you can get access to the command prompt through Admin privileges, then look for the command prompt in the Windows search.
- Click on Run As Administrator.
- Type in the command sfc/scannow.
- Press enter and the system will start looking for corrupt system files. Wait while Windows will fix these files.
After the process ends, make sure to restart the computer and then access the cmd as a user. It should be fixed now.
5. Scan for Malware Using Windows Defender
Malware issues are always rampant on the Windows OS. If you browse a lot of websites, install dozens of apps chances are that some stubborn malware may have made its way into your computer. Its presence causes the command prompt to become unresponsive or crash abruptly.
So, you have to use Windows Defender to perform a scan of your computer manually.
- Press Windows + I to bring up the Windows Settings section.
- Then click on Privacy & Security.
- After that, click on Windows Security.
- Next, click on Virus & Threat Protection.
- You can click on Quick Scan or perform a full scan that will seek for malware in the hard drives as well.
If any malware gets spotted then remove it. Now, you should not face any issues while running the command prompt.
6. Integrate the Missing Environment Variable
Some of you may be facing this issue of command prompt repeatedly opening and crashing in quick succession. This happens due to a missing variable in the path that opens the command prompt. Integrate the Missing Environment Variable to the Path of the Command Prompt to fix the issue manually.
- Press Windows + R to invoke the run dialog box.
- Open the System Properties by entering sysdm. cpl and hitting the enter key.
- Click on the Advanced tab and navigate to the bottom of the dialog box.
- Then click on Environment Variables.
- Next, under the System Variables click to highlight the option Path.
- Then click on Edit.
- Now, click on New and add the element C:\Windows\SysWow64 as a new entry to the system variables.
- Click on OK to save the edit and follow it up by restarting the computer.
This should fix the command crashing issue on your Windows 11. So, these are the various troubleshooting methods that you can implement. I hope this was helpful.
If you've any thoughts on Command Prompt is Crashing on Windows 11: How To Fix, then feel free to drop in below comment box. Also, please subscribe to our DigitBin YouTube channel for videos tutorials. Cheers!
Hy! saud here. I have tried all the steps but unable to solve the cmd crashing issue.I’m using windows 11 and the problem is when ever i open cmd and try to work with it e.g. installing libraries or whatever it automatically closes after 30-40 seconds. Same thing happen while using vs code .when i open a terminal in vs code to work with it it shows an error that:
The terminal process:
“C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe” terminated with exit code: 2.