Top 6 Ways to Fix Command Prompt Keeps Popping Up in Windows 11

It’s natural to feel clueless when Command Prompt keeps popping up on your Windows 11 PC for no apparent reason. Although misconfigured startup settings or scheduled tasks are the usual culprits for this issue, it can also be caused by malware infection. Hence, it’s vital not to ignore such behavior.

Top Ways to Fix Command Prompt Keeps Popping Up in Windows 11

If the random Command Prompt pop-ups are driving you crazy, this guide can help. Below are some effective tips that will keep Command Prompt (CMD) from popping up on your Windows 11 PC. So, let’s take a look.

1. Stop Command Prompt From Opening at Startup

If you have previously set up Command Prompt as a startup app, it may launch automatically whenever your computer boots up. Here’s what you can do to stop that.

Step 1: Press Ctrl + Shift + Esc keyboard shortcut to open the Task Manager.

Step 2: Switch to the Startup apps tab, and locate cmd or Terminal on the list. Right-click on it and select Disable.

Disable CMD as Startup App in Windows

You’ll also need to ensure that the Command Prompt’s EXE shortcut isn’t added to the Startup folder on Windows. For that, press the Windows key + R to open the Run dialog box. Type shell:startup in the box and press Enter.

Open Startup Folder in Windows 11

Locate and select shortcuts for Command Prompt or Terminal. Then, click the trash icon at the top to delete them.

Disable CMD and Terminal as Startup App in Windows

2. Disable Office Background Tasks

OfficeBackgroundTaskHandlerRegistration is a service that executes background tasks for Office apps on your PC. However, this service is known to cause random Command Prompt pop-ups on Windows. Here’s how you can stop the service from running automatically on your system.

Step 1: Press the Windows key + S to open the search menu, type in task scheduler, and press Enter.

Open Task Scheduler

Step 2: Double-click Task Scheduler Library in the left pane to expand it.

Task Scheduler Window

Step 3: Expand the Microsoft folder and then click on Office.

Office Folder in Task Scheduler

Step 4: Right-click the OfficeBackgroundTaskHandlerRegistration entry in the middle pane and select Disable.

Disable Office Registration Tasks on Windows

3. Modify Registry Files

Another thing you can do to stop Command Prompt from opening is to remove its automatic startup entry from the registry files. Since editing the Windows Registry is slightly risky, make sure you back up all the registry files or create a restore point before proceeding.

Step 1: Click the search icon on the taskbar, type in registry editor, and select Run as administrator.

Open Registry Editor as Admin

Step 2: Select Yes when the User Account Control (UAC) prompt appears.

Open Registry UAC Prompt

Step 3: Paste the following path in the address bar at the top and press Enter.

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Registry Editor Window

Step 4: Locate the CMD entry in the right pane. Right-click on it and select Delete.

Remove CMD Entry From the Registry Editor

Step 5: Select Yes to confirm.

Confirm Remove CMD Entry From the Registry Editor

4. Perform a Clean Boot

Malicious programs and services running on your PC can also cause Command Prompt to appear and then disappear automatically. You can start Windows in a clean boot state to check for this possibility. Here are the steps for the same.

Step 1: Press the Windows key + R to open the Run dialog. Type msconfig in the box and press Enter.

Open System Configuration on Windows 11

Step 2: Under the Services tab, tick the ‘Hide all Microsoft services’ checkbox and then click Disable all button.

Disable Third-Party Services on Windows

Step 3: Switch to the Startup tab and click on Open Task Manager.

Open Task Manager on Windows

Step 4: In the Startup tab, select a third-party app or program and then click the Disable option at the top. Repeat this step to disable all third-party apps and programs.

Disable Third-Party Startup Apps on Windows 11

Restart your PC to enter a clean boot state and try using it for a while. If Command Prompt does not open automatically during this time, it means the third-party app or program responsible for the issue got disabled. You can try removing any recently installed apps and programs and see if that fixes the problem.

5. Scan for Malware

The unusual behavior of Command Prompt could be due to a malware or virus infection. To rule out this possibility, you can run a full system scan using Windows Defender or a third-party antivirus program of your choice. If the scan reveals anything suspicious, take the recommended steps to remove the threat.

Scan for Malware

6. Install Windows Updates

Lastly, if nothing works, you can see if there are any pending updates for Windows. If it’s a system-related issue that’s causing Command Prompt to appear randomly, installing pending updates should help.

Press the Windows key + I to launch the Settings app. Navigate to the Windows Update tab and click the Check for updates button. Download and install pending updates and then check if the issue is still there.

Check for Windows Updates

No More Surprises

Seeing a Command Prompt window pop up randomly can be distracting, especially when you are working. We hope that one of the above-mentioned fixes helped you fix the underlying problem, and Command Prompt is no longer opening on its own.

Was this helpful?

Thanks for your feedback!

Last updated on 25 April, 2023

Leave a Reply

Your email address will not be published. Required fields are marked *

The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.