Fix cmd window closes too fast on Windows 11. Check out some below solutions to fix the error.
Table of contents:
Why does cmd window close too fast on Windows 11
- The system files on the device are corrupted.
- There may be a bug on the current build of Windows 11 installed on your PC.
- It can happen due to the presence of some malware on the computer.
- An environment variable is missing from the path that is normally assigned to the open command prompt.
- Command prompt on Windows 11 crashed due to auto-running cryptomining key.
Fix cmd window closes too fast on Windows 11
1. Restart the computer
You should restart your PC as it could be a minor software issue causing the command prompt to get messed up.
- Type in Windows .
- From the dialog that pops up, click the power icon.
- Then click Restart from the menu that appears.
In most of the cases, users have reported that only restarting their computer solved the Windows 11 command prompt problem.
2. Update Windows OS build
Errors still haunt the Windows OS despite its upgrade to Windows 11. Microsoft regularly releases updates to fix bugs that render various applications and services useless on computers.
To search for new updates available for your computer,
- Press Windows + I to open Windows settings.
- Then click on Windows Update.
- Next, click Check for Updates.
- If a new update is available, you will be prompted to download and install the same.
- To install a Windows update, click Download Now next to the update description.
After updating, check if you still get the command prompt error on your Windows 11 computer.
3. Remove Cryptocurrency Mining Auto Key
Cryptocurrency mining is the new fad but it also brings a lot of malware. One of them is called SoundMixer. It is an autorun key that messes with the registry and makes unauthorized modifications.
This is the cause of the command prompt not working on Windows 11. However, this problem can be fixed.
- Open Registry Editor by calling the run dialog Win + R .
- Then navigate to the menu bar and click Edit .
- From the drop-down menu, click Find.
- In the Find field, enter SOUND MIXES.[ make sure the three options are checked ]
- Two things will happen right now. The search results will either find a key that automatically runs SOUNDMIXER or it won’t.
- Luckily, on my PC I didn’t find SOUNDMIXER even after searching many times.
- In case, you find the folder SOUNDMIXER is located after performing the find action, then open that folder in the registry itself.
- When you expand it, you will see an autorun registry entry. Simply delete it.
- Just to confirm, you can repeat the steps above to check if SOUNDMIXER has found its way into other locations.
Note that the autorun key may appear randomly. Only by using the Find action can you locate it.
As a pro tip, I would suggest that if you are learning about cryptocurrency mining make sure your computer is free of malware. Timely run a full Windows Defender scan or use any other third-party antivirus you have installed on your PC.
4. Repair Corrupt System Files
There are certain system files that, when corrupted, affect the way other applications work on the computer.
- if you can access the command prompt through Administrator privileges, look for command prompt in Windows search.
- Click Run As Administrator .
- Enter the command sfc/scannow .
- Press enter and the system will start searching for corrupted system files. Wait while Windows will fix these files.
After the process is finished, make sure to restart the computer and then access cmd as user. It should be cured now.
5. Scan for Malware with Windows Defender
Malware problems have always been rampant on the Windows operating system. If you browse through lots of websites, install dozens of apps, chances are some stubborn malware has infiltrated your computer. Its presence causes the command prompt to become unresponsive or crash unexpectedly.
So you have to use Windows Defender to manually scan your computer.
- Press Windows + I to bring up the Windows Settings section.
- Then click on Privacy & Security .
- Then click Windows Security.
- Next, click on Virus & Threat Protection.
- You can click Quick Scan or perform a full scan to look for malware in your hard drive.
If any malware is found, remove it. Now, you will not face any problem while running command prompt.
6. Environment Variables Integration Missing
Some of you may have encountered the problem of the command prompt opening continuously and crashing in quick succession. This happens because of a missing variable in the command prompt opening path. Integrate Missing Environment Variables into Command Prompt’s Path for manual troubleshooting.
- Press Windows + R to invoke the run dialog.
- Open System Properties by typing sysdm.cpl and press enter key.
- Click Advanced and navigate to the bottom of the dialog box.
- Then click on Environment Variables.
- Next, under System Variables click to highlight the Path option.
- Then click Edit.
- Now click New and add the C:WindowsSysWow64 element as a new entry for system variables.
- Click OK to save the edit and follow up by restarting the computer.
We hope this article helps you! Visit Macwintips.com to update the most practical and useful tips for Mac and Windows.