How to Fix Command Prompt Not Working in Windows 10 Error

Gaurav Bidasaria

In the early days of computing, Command Prompt reigned the operating systems before the elegant graphic user interfaces became the primary mode of interaction with the computers. Today, the Command Prompt is mostly used by advanced users to troubleshoot specific Windows issues, perform administrative functions, and automate tasks via scripts and batch files.

Fix Command Prompt Not Working In Windows 10 Error

What should you do when you try to open the Command Prompt, and it throws an error instead of opening usually? That is the topic of today's guide. Let's take a look at some steps that can solve the Command Prompt not working error so you can go back and execute those commands.

Fun Fact: Command Prompt has a symbol at the beginning of the line that prompts the user for a command, indicating that it is ready for input and hence the name Command Prompt.

Let's begin.

1. Check Antivirus

Some antivirus software are known to cause problems with Command Prompt. One such antivirus is Avast. It is known to place the consent.exe file in quarantine causing the Command Prompt to crash. If you are using Avast, restore this file or look for an alternative antivirus.

Fix Command Prompt Not Working 24

If you are using some other antivirus, I would recommend disabling it once to see if it solves the Command Prompt not working error in your Windows 10 computer.

2. Command Prompt Shortcut

It is possible that the Start Menu is not working as intended. In that case, you can create a Command Prompt shortcut on your desktop to launch the same. To do so, right-click anywhere on your desktop and select Shortcut under New.

Fix Command Prompt Not Working 1

On the pop-up window, type cmd.exe (no need to browse to the location of the executable file) in the box, and then click on Next.

Fix Command Prompt Not Working 2

Give it a suitable name and click on Finish. Wait, there's some more to take care of.

Fix Command Prompt Not Working 3

That shortcut will launch the Command Prompt but not in administrator mode. For that, right-click on the newly created shortcut and select Properties.

Fix Command Prompt Not Working 4

Under the Shortcut tab, select Advanced.

Fix Command Prompt Not Working 5

Select Run as administrator here, click on OK, and you are done.

Fix Command Prompt Not Working 6

Try launching the Command Prompt now.

Note: This solution isn't suitable for shared computers for some users might end up messing with the system accidentally if they aren't sure what they're doing.

3. Create New User

The Command Prompt needs admin rights which means the user account that you've logged in with requires administrative privileges. If you do, maybe some files got corrupted resulting in the Command Prompt error. Let’s create a new user account to test this solution.

Press the Windows key+I shortcut on the keyboard to launch Settings and select Accounts.

Fix Command Prompt Not Working 7

Under Family & other users, select Add someone else to this PC.

Fix Command Prompt Not Working 8

Click on 'I don't have this person's sign-in information' here.

Fix Command Prompt Not Working 10

Now click on 'Add a user without a Microsoft account.'

Fix Command Prompt Not Working 11

Enter the desired username and password here and follow the on-screen instructions to create a new user account. Once done, switch user account by pressing the Windows key to launch the Start Menu and selecting the newly created user account under your current account.

Fix Command Prompt Not Working 9

Check if you can run the Command Prompt now.

4. Update Path of System Environment Variables

The Microsoft support staff recommends this so we figure it would work aptly. Type system environment variables in the Start Menu search and select the Edit option.

Fix Command Prompt Not Working 13

Under the Advanced tab, select Environment Variables.

Fix Command Prompt Not Working 14

Select Path here and click on Edit.

Fix Command Prompt Not Working 15

Click on New and add this to create a new path.

Fix Command Prompt Not Working 16

Now reboot your computer and check if you can launch the Command Prompt.

5. System File Checker (SFC)

Open PowerShell with admin rights by either searching for it in Windows Start Menu or right-clicking the Windows button. When it opens (blue background), you will execute the below command.

SFC /Scannow
Fix Command Prompt Not Working 17
Pro Tip: PowerShell is the more advanced version of Command Prompt, and you can execute all CMD commands on PowerShell.

After that, SFC command will check for irregularities in your OS's system files and repair them, if necessary. It may take 15-20 minutes so sit back and relax. If it finds no errors, you will see a message that says something like ‘no integrity violations were found.’ If some corrupt files were found and repaired, you would see a message telling you that ‘corrupt files were repaired’ and ‘details are included in a CBS.log file’ with the path to the file also mentioned.

If files are repaired, I suggest you reboot your computer before trying to open the Command Prompt.


Sometimes, the SFC command fails to perform its duty because it fails to find or access the correct files from the Windows image. That is when you will run the DISM (Deployment Image Servicing and Management) command and re-run the SFC command again.

Open PowerShell again and run the below commands in that order one at a time.

Fix Command Prompt Not Working 18
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth

Now go back to point 5 above and perform an SFC scan.

7. Remove Context Menu Items

When you install a new app or software, it adds a shortcut to the context menu. The context menu pops up when you right-click on your desktop or within an app. Noticed some new options that were not there when you first started using Windows? To remove these context menu items, download ShellMenuView and ShellExView. I recommend you to take a backup at this point.

Fix Command Prompt Not Working 19

First, launch ShellMenuView, and under Menu Name, you will see all software and app context menu shortcuts that were not created by Microsoft. For example, PotPlayer is a third-party app while Microsoft developed Windows Media Player. Select all non-Microsoft context menu shortcuts and disable them by clicking on the red icon. Repeat the same process with ShellExView.

8. Safe Mode

Maybe a recently installed app is causing a conflict with the Command Prompt? To find out, reboot in Safe Mode. To do so, press and hold the Shift key on your keyboard and select Restart under the Power options in the Start Menu.

Fix Command Prompt Not Working 20

You PC will now reboot and you should see a blue screen with some options. Select Troubleshoot>Advanced options>Startup Settings>Restart. You can now choose to reboot into Safe Mode. Read more about the process here.

If the Command Prompt works in Safe Mode, you need to uninstall all recently installed apps and reinstall them one at a time to see which one breaks Command Prompt. I know it's a tedious process, but you have no choice.

9. System Restore

You can restore your computer to a previous point in time, and by doing so, you will restore balance to your universe or your PC. Note that your files and other data will not be deleted. That may eliminate and undo whatever broke the Command Prompt. To do so, search for Restore in Windows Start Menu and select Recovery.

Fix Command Prompt Not Working 21

Select Open system Restore.

Fix Command Prompt Not Working 22

You should now see all the system restore points made recently. Click on Show more restore points to reveal more options.

Fix Command Prompt Not Working 23

Select one and follow on-screen instructions to restore your PC. The process will take quite a while, and your system may reboot several times.

Your Wish is My Command

While you can use PowerShell to execute any command that you wanted to use in Command Prompt, it is still a good idea to fix the former because it may cause further trouble in the future. If you found another way to fix the Command Prompt, do let us know in the comments below.

Next up: Fed up of the good old Command Prompt and even PowerShell? Here are three CMD alternatives that will make you forget these two.

Read Next
3 Command Prompt Alternatives That Are Better than the Default
Also See
#Command Prompt #troubleshooting

Join the newsletter

Gaurav is a tech enthusiast who loves talking about new technologies and gadgets. He dropped out of CA because he found the work boring and monotonous! When he is not following blockchain tech or the crypto markets, you can find him either Netflix-ing or gaming.