CMD Prompt Keeps Popping up: 5 Ways to Fix It

Perform a clean boot or try running the SFC scan command

by Sagar Naresh
Sagar Naresh
Sagar Naresh
Content Analyst
Sagar is a web developer and technology journalist. Currently associated with WindowsReport and SamMobile. When not writing, he is either at the gym sweating it out or playing... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • Users have been complaining that the CMD prompt keeps popping up on their PCs, even after closing them multiple times.
  • This issue could be because your PC is infected with a virus, or it can be a file corruption problem.

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

The CMD prompt popping up is not a new issue and has been reported by users for quite some time. This is why many users want to change the default terminal in Windows 11.

Thankfully in this guide, we will give you 5 ways via which you can easily fix the CMD prompt that keeps popping up issue. Let us get right into it.

What causes the CMD prompt to keep popping up?

After some research, we have found some common reasons the CMD prompt is popping up on your PC.

  • CMD.EXE might be added to the startup folder: By accident, you might have added CMD.EXE to the startup folder because of which it is starting up randomly.
  • Your PC is infected with virus: A virus or malware-infected PC can cause it to malfunction and throw multiple errors. You should always install an antivirus on your PC to keep it safe.
  • Some system files are missing: If a system file is missing or corrupt, then this could cause multiple issues with your PC.
  • The latest Windows update isn’t installed: It could be because of a bug in the version of the Windows update you are currently operating.
  • Scheduled task is running in the background: The most common reason this issue gets triggered is that the scheduled task is running in the background.

What can I do if the CMD prompt keeps popping up?

Here are a bunch of general solutions that you can apply before heading over to the advanced procedures:.

  • It could be because there is a temporary glitch or bug in your PC that is causing the problem. To fix this, you can simply try a restart and see if this resolves the issue or not.
  • Try creating a new user account. Often such glitches are associated with faulty account profiles. You can either try creating a new user profile or try using an admin account to see if the problem exists there or not.

Let us check out the advanced solutions to resolve the error.

1. Disable Office tasks

  1. Press the Win + R keys to open the Run dialogue.
  2. Type taskschd.msc and press Enter.
  3. Expand the Task Scheduler Library.
  4. Double-click the Microsoft folder.
  5. Select the Office folder.
  6. Locate the task named OfficeBackgroundTaskHandlerRegistration.
  7. Right-click on OfficeBackgroundTaskHandlerRegistration and select Disable.

In case you see that the Office task isn’t the one causing problems for you like others, then you can click the Task Scheduler Library from the left pane and look at the scheduled tasks on the right.

You can disable any one of the tasks that you might find odd or unnecessary.

2. Scan your PC for viruses

  1. Open the Start menu by pressing the Windows button.
  2. Search for Windows Security and open it.
  3. Click on Virus & threat protection.
  4. Hit the Quick Scan button.
  5. The system will be scanned and if found any virus, will prompt you to perform necessary actions.
  6. You can also click on Scan options.
  7. Click on Full Scan to perform a deep scan of your PC.

The above options are shown for the in-built Windows Security tool. But even if you have a third-party antivirus installed on your PC, it gives you an idea that you need to perform a virus scan on your PC. You can choose from our best antivirus solutions listed and see what suits your needs best.

3. Run SFC Scan

  1. Open the Start menu.
  2. Search for Command Prompt and run it as an administrator.command prompt admin windows 11
  3. Type in the the following command and press Enter: sfc /scannowsfc scan command in command prompt.
  4. The tool will check for missing or corrupt system files and will replace them with working ones.
  5. After the process completes, restart your PC.

Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

SFC Scan is an inbuilt command line that scans your PC for corrupt or missing system files. You can easily fix all the problematic files by running this simple command on your PC and also correct the CMD prompt issue.

If you want an easier and quicker solution then you might want to try a dedicated tool that can perform this process automatically.

Restoro is the most reliable program when it comes to thorough scans because it provides a detailed statement of your corrupt or missing system files and essentially repairs or replaces them with new ones from its updated repository.

Get Restoro

4. Perform a clean boot

  1. Open the Start menu.
  2. Type msconfig and open System Configuration.
  3. Switch to the Services tab.
  4. Select Hide all Microsoft services.
  5. Click on the Disable all button.
  6. Hit the Apply button to save the changes.
  7. Click on the Startup tab.
  8. Select Open Task Manager.
  9. In the Startup tab of the Task Manager, Disable all the Enabled startup items.
  10. Close Task Manager.
  11. Restart your PC.

This can help you determine if a Microsoft service was causing the CMD prompt keeps popping up an issue or not.

5. Remove CMD.exe from the Registry Editor

  1. Press the Win + R keys to open the Run dialogue.
  2. Type regedit and press regedit command
  3. Navigate to the below path: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  4. If you find CMD.exe on the right side, then right-click on it and select Delete.

That is it from us in this guide. In case you can’t run the Command Prompt as an administrator, you can check out our guide that gives you some easy steps to resolve the issue.

If you can’t view the product key in the Command Prompt, then you can refer to our guide that gives you a proper solution to fix the issue.

Let us know in the comments below, which one of the above-mentioned methods helped you resolve the CMD prompt problem.

Still having issues? Fix them with this tool:


If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: