Fix cmd window closes too fast on Windows 11

Fix cmd window closes too fast on Windows 11. Check out some below solutions to fix the error.

Fix cmd window closes too fast on Windows 11
Fix cmd window closes too fast on Windows 11

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.

  1. Type in Windows .
  2. From the dialog that pops up, click the power icon.
  3. 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,

  1. Press Windows + I to open Windows settings.
  2. Then click on Windows Update.
  3. Next, click Check for Updates.
    Check for Updates
    Check for Updates
  4. If a new update is available, you will be prompted to download and install the same.
  5. To install a Windows update, click Download Now next to the update description.
    click Download Now 
    click Download Now

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.

  1. Open Registry Editor by calling the run dialog Win + R .
  2. Then navigate to the menu bar and click Edit .
  3. From the drop-down menu, click Find.
  4. In the Find field, enter SOUND MIXES.[ make sure the three options are checked ]
  5. Two things will happen right now. The search results will either find a key that automatically runs SOUNDMIXER or it won’t.
  6. Luckily, on my PC I didn’t find SOUNDMIXER even after searching many times.
  7. In case, you find the folder SOUNDMIXER is located after performing the find action, then open that folder in the registry itself.
  8. When you expand it, you will see an autorun registry entry. Simply delete it.
  9. 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.

  1. if you can access the command prompt through Administrator privileges, look for command prompt in Windows search.
  2. Click Run As Administrator .
  3. Enter the command sfc/scannow .
    Repair Corrupt System Files
    Repair Corrupt System Files
  4. 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.

  1. Press Windows + I to bring up the Windows Settings section.
  2. Then click on Privacy & Security .
  3. Then click Windows Security.
    click Windows Security
    click Windows Security
  4. Next, click on Virus & Threat Protection.
    click on Virus & Threat Protection
    click on Virus & Threat Protection
  5. 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.

  1. Press Windows + R to invoke the run dialog.
  2. Open System Properties by typing sysdm.cpl and press enter key.
  3. Click Advanced and navigate to the bottom of the dialog box.
  4. Then click on Environment Variables.
  5. Next, under System Variables click to highlight the Path option.
  6. Then click Edit.
     System Variables
    System Variables
  7. Now click New and add the C:WindowsSysWow64 element as a new entry for system variables.
  8. 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.