Fix: Command Prompt Keep Popping Up on Windows

If you are a Windows 10 user then you might notice the command prompt popping up on your screen. The pop up will disappear within a second and you most likely won’t be able to see what’s written in the command prompt. It can happen only at the first login of the Windows or it might happen randomly from time to time during your usage of the computer. It might also happen after a specific time e.g. after every hour or after every 47 minutes. Most of the users have complained about this appearing during their gaming sessions. And, if the command prompt appears during your gaming session then it will most likely minimize your game because the command prompt takes the focus.

Command prompt

There are a number of things that can cause this. If the command prompt is popping up after a specific time then the most likely cause is the task scheduler. There are some Windows services and third-party applications that can make an indefinitely recurring task in your task scheduler. It can also be caused by a Windows service trying to download something from the internet and failing, thus, trying over and over again. Although rare but not entirely out of the question is malware. There are certain viruses that hide as a Windows own service/application and it might be one of those viruses trying to either run something or download something from the internet.

Method 1: Turn Off Office Tasks

The most cause of this issue is a scheduled task running in the background. So, the logical step is to start with checking the task scheduler. A lot of the applications create a scheduling task that runs periodically. Sometimes it might be a bug or simply bad design but sometimes it might be a malware scheduled to download information after a specific period of time as well. We will cover malware in method 3. In this method, we will have a look at Microsoft Office-related tasks because Microsoft Office is known to create a scheduled task that creates this kind of issue.

So, follow the step given below

  1. Hold Windows key and press R. Type taskschd.msc and press Enter

  1. This should open the task scheduler. Double click the Task Scheduler Library folder from the left pane
  2. Double click the Microsoft folder from the left pane
  3. Select the Office folder from the left pane
  4. Now, locate the task named OfficeBackgroundTaskHandlerRegistration in the mid pane

  1. Select the OfficeBackgroundTaskHandlerRegistration and click Disable from the rightmost panel (or right-click and select Disable). Note: If you don’t want to disable then you have another option as well. You can change some settings that will make this task run in the background and you won’t see the CMD pop up. If you want to change these options then follow the steps given below
    1. Right-click the OfficeBackgroundTaskHandlerRegistration and select Properties.

    1. Click Change User or Group

    1. Type System and Click Ok. If prompted, click OK again.

This should fix the issue. If it doesn’t, repeat the steps given above and disable the task named OfficeBackgroundTaskHandlerLogon as well. The command prompt shouldn’t come up once you are done.

Note: If this doesn’t solve the problem then you can open the Task scheduler and click the Task Scheduler Library from the left pane. You can look at the scheduled tasks from the list and disable any task that you might find odd or troubling. There can be multiple types of tasks scheduled to run that might be causing this problem. A lot of users noticed a RealDownloader update check task that was scheduled to run after every 47 minutes. So, if you find any of the scheduled tasks that seem odd then try to disable them.

Method 2: Using PowerShell

There are some commands that you can use in the Powershell to check if there is something getting downloaded or not. This will help troubleshoot whether the problem is because of some service or not.

  1. Press the Windows key once and type PowerShell in the Windows Start Search
  2. Right-click PowerShell from the search results and select Run as administrator
  3. Type the following command and press Enter.
    Get-BitsTransfer -AllUsers | select -ExpandProperty FileList | Select -ExpandProperty RemoteName

    This command will show you the things that are being downloaded on your system. It will also include the locations where these things are downloaded from. If you don’t see anything (like in the screenshot) then this simply means that there is nothing downloading on your PC.

  4. Once done, type the following command and press Enter. This command will stop the non-Windows updates from getting downloaded.
    Get-BitsTransfer -AllUsers | Remove-BitsTransfer

Method 3: Check for Malware

Command prompt popping up can be an indicator of an infected system as well. Lots of malware and viruses tend to download information from the internet. A lot of the times they also disguise as legitimate services. So, if following the instructions in methods 1 and 2 didn’t solve the issue then the most likely cause is malware.

So, here are the steps to detect whether your system is infected or not.

  1. You should scan your system with either AdwCleaner or ESET Online Scanner (Or both).adwcleaner2
  2. Click here and download the AdwCleaner and run it. Check if it finds any infected files. You can use the free version
  3. Click here and scan your system with the ESET Online Scanner. It might take a while but it will be worth it. We recommend you start with the ESET Online Scanner and check if it catches any infected files.

If these applications find an infected file then make sure you get rid of it.

Note: If you have Kaspersky or any other security application then either disable it or uninstall it before running the ESET online scanner. These are known to cause conflicts and your ESET scan might not complete.


Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.