How to Fix Command Prompt Not Recognizing Commands?

4
30
How to Fix Command Prompt Not Recognizing Commands

The Command Prompt is a very useful tool available in Windows that allows performing a plethora of tasks very quickly and efficiently.

However, at times, it may malfunction and display an error message, stating something like “not recognized as an internal or external command” when you try to run a specific command.

This is quite a common error, and there are quite a few easy fixes for it. It is about those specific fixes and troubleshooting steps that this article will tell you about.

KEY TAKEAWAYS

  • The easiest and most common fix to the issue of the Command Prompt not recognizing internal or external commands is to check whether the program is installed in the system.
  • Writing the entire path in the command is another useful way to fix this issue since it will help Windows to recognize it easily and quickly.
  • The path in the Environment Variables may also be adjusted so that Windows can follow it easily and allow Command Prompt to recognize the commands.
  • An easy fix for this issue is to move the specific file in question to the System 32 folder.
  • You can even change the directory to SysWOW64, depending on the version of the program or executable.

Why is Command Prompt Not Recognizing Internal or External Commands?

The most significant reason for the Command Prompt not to recognize internal or external commands is wrong input or incorrect execution of the command.

In such situations, Windows will not be able to find the executable matching the filename and the extension in any directory, according to the Environment Variables Path.

Another major reason for the Command Prompt failing to recognize internal or external commands is issues with the Windows Environment Variable itself, which actually maintains the record of the paths followed or to be followed by the Windows operating system.

There are also a few other reasons for this error to occur, which include, but are not limited to, the following:

  • Incorrect or problematic entries in the registry that are interrupting the normal functioning of the commands.
  • A file directory may be missing.
  • The executable scripts or programs may not be installed at all or may be installed incorrectly.
  • The filename or the path may be specified incorrectly without the extension or the entire path.
  • The executables in the System32 folder may not be included in the 64-bit Windows operating system.
  • The application files may not be installed at the correct location by the installer.
  • The correct tool to be launched with CMD may not have been enabled by the installer.
  • There may be a specific app installed on your PC that is messing things up and creating issues with the system variables.

Ways to Fix Command Prompt Not Recognizing Internal or External Commands

How to Fix Command Prompt Not Recognizing Commands

Assuming that the specific programs you want to use are installed on your system, you can fix the issue of the Command Prompt not recognizing the internal or external command by writing the entire path, preferably inserted in double quotes.

Read Also:  Why Your CPU Won’t Turn on? (13 Reasons & Fixes)

You can also fix the issue by:

  • Making adjustments in the Environment Variables path
  • Moving the file into the System 32 folder
  • Changing the directory according to the version of the executable

These are the steps that you should follow for each specific process.

Method 1: Check the Existence and Location of the Program

This process actually consists of different steps, depending on the outcome.

The first thing you should do is check whether or not the .exe files of the concerned programs are actually installed on your PC.

Then you must check whether it is stored at the correct location, which is usually C:\Windows\System32.

It is in this directory that Windows will look for the files of any app installed on the computer system. If it is not, then the Command Prompt will not recognize the command.

STEPS TO FIX:

To check whether the specific program, say, Microsoft Edge or msedge.exe, is installed:

  • Open the Run Box by pressing the Windows and R keys on your keyboard together.
  • Type control in the box.
  • Click on the OK button or hit the Enter key.

Type control in the box

View by Category

  • Then click on Programs and Features in the new window.

Programs and Features

Alternatively, if you View by Large icons, you can click on Programs and Features directly as shown below:

View by Large icons

  • Scroll down through the list of apps displayed on the right side of the new window, Uninstall or change a program.
  • Find out the specific program you want to run.

Uninstall or change a program

To be doubly sure, also press the Windows and I keys to open Settings.

  • In the Settings window, go to Apps.

go to Apps

  • Select Apps & features from the left panel in the new window.
  • Look for the particular program in the list of apps on the right side of the window by scrolling down through it.

Apps & features

Now, if you do not find the program installed, install it first to proceed with the following steps.

Once you have verified the installation of the program, now check for its exact location in the following ways:

  • Press the Windows and E keys together on your keyboard to open File Explorer.
  • Go to This PC on the left panel of the window.
  • Select and double-click on Drive C to open it.

Go to This PC

  • Open the Windows folder by double-clicking on it.

Windows folder

  • Look for the System32 folder by scrolling down the new window, and double-click on it to open it.

System32 folder

Scroll down the entire list displayed on the right side of the window to check whether or not the specific program is located there.

If it is there, well and good. If it is not, you will need to move the program to the System32 folder by following these particular steps:

Read Also:  CMOS Battery Failure and Solutions

Program Files or Program Files (x86)

  • Copy all the files available in the folder of the specific program you want to move to the System32 folder by pressing CTRL + A.
  • Right-click on the section.
  • Click on Copy from the drop-down menu.

Click on Copy from the drop-down menu

  • Now, open the System32 folder as described above.
  • Paste (CTRL + V) the copied file.
  • Click on the Yes button if the UAC or User Account Control prompt appears.

When you are done with all these steps, open the Command Prompt now and run the command that it was not allowing you to run before and hit Enter. CMD will now open it instantly, as shown in the image below:

open the Command Prompt now

Expert tip:

If you really have to move the files to the System32 folder, do it cautiously and make sure that you try the other solutions mentioned in this article first, where you do not have to install an application, and then go ahead with it.

This is because every time you move the appropriate executables into this folder to use from the Command Prompt, it will grow larger with a lot of files sitting in there.

Also, there may be specific executable tools that you won’t be able to move to the System32 folder.

This is because they are designed to be installed in a particular directory, and their specific path for installation is defined in the Windows Registry.

Method 2: Type the Full Path of the Executable File

The Command Prompt may not recognize the internal or external command if you do not type the full path of the executable file. Therefore, find the full path and type it always.

STEPS TO FIX:

  • Go to the System32 folder as described above.
  • Right-click on the file you want to use, say, chkdsk.exe.
  • Click on Copy as path from the drop-down menu.

Copy as path

  • Now, open the Command Prompt.
  • Paste the path to run the command successfully.

open the Command Prompt

Expert tip:

It is good to insert the command within double quotes. This is because the command will not work if there are white spaces within the file path.

The Command Prompt will typically read the command till the white space, considering it to be the end of the command. Anything written after the space will be considered a separate command.

When the entire command is put within double-quotes, it will not create such confusion and work successfully.

Method 3: Make Changes in Windows Environment Variables

You will need to add the path of the executable file to the Windows Environment variables to ensure that the Command Prompt recognizes the internal and external commands.

STEPS TO FIX:

  • Open the Run dialog box and open the Control Panel as you did in Method 1.
  • This time, go to System and Security.

System and Security

  • Select and click on System.

Select and click on System

  • Choose Advanced system settings on the far right-hand side of the About page.

Advanced system settings

  • In the new System Properties window, go to the Advanced tab and then click on the Environment Variables button at the bottom.

Click on Environment Variables

  • Now, under System variables in the new Environment Variables window, click on Path.
  • Then click on the Edit button
Read Also:  How to Fix Task Host Window Preventing Shutdown?

Environment Variables window

  • This will open the Edit environment variable window. Click on the New button on the right side.

Edit environment variable

  • Type the folder path of the program or application, (Chrome, for example) that you want to use and run on Command Prompt.

Type the folder path

To find the folder path, you can proceed in two specific ways.

  • One, go to the window where the application is stored, copy the path, and paste it in the Edit environment variable window.

copy the path

  • Two, click on the Browse button on the Edit environment variable window > go to the folder > select it > click on OK.

click on the Browse button

  • Click on the OK button and close all windows.

Finally, restart your PC and try running the Command Prompt. This should resolve the problem.

Method 4: Change the Directory

There may be a few specific 32-bit programs installed on your PC that are designed to work only in a 32-bit environment.

Typically, the directory for these programs is C:\Windows\SysWOW64. Therefore, if the Command Prompt looks for them in the usual System32 folder, it will not find them and hence not recognize the command.

So, change the directory first by typing the command cd c:\windows\SysWOW64 in the Command Prompt, as shown below:

cd c:\windows\SysWOW64

Now, CMD will look for the 32-bit executable in the right directory and execute the command you want to run successfully.

Method 5: Change the Path

The issue of the Command Prompt not recognizing the internal or external command is mainly caused due to the path you are using and not the specific command.

So, make sure that you are using the right path. If not, change it.

STEPS TO FIX:

  • After you see the error message in the prompt, simply type cd /
  • Press the Enter key.

This will take you to the main C Drive.

  • Then type in cd Windows\System32
  • Press Enter.

Now enter the particular command you want to run in the Command Prompt, ipconfig in this case, and it will run perfectly, which was not running earlier, as shown in the image below:

cd Windows\System32

Conclusion

So, as you see, this article includes the fixes for both versions of the error of the Command Prompt not recognizing commands.

One or the other will surely fix the error you are coming up against every time you want to run a command.

Just make sure that you choose and follow the one relevant to your specific case.

About Dominic Chooper

AvatarDominic Chooper, an alumnus of Texas Tech University (TTU), possesses a profound expertise in the realm of computer hardware. Since his early childhood, Dominic has been singularly passionate about delving deep into the intricate details and inner workings of various computer systems. His journey in this field is marked by over 12 years of dedicated experience, which includes specialized skills in writing comprehensive reviews, conducting thorough testing of computer components, and engaging in extensive research related to computer technology. Despite his professional engagement with technology, Dominic maintains a distinctive disinterest in social media platforms, preferring to focus his energies on his primary passion of understanding and exploring the complexities of computer hardware.

Previous articleHow to Fix Command Prompt Not Changing Directory?
Next articleWhat is Windows Settings App? (Explained)
Dominic Chooper
Dominic Chooper, an alumnus of Texas Tech University (TTU), possesses a profound expertise in the realm of computer hardware. Since his early childhood, Dominic has been singularly passionate about delving deep into the intricate details and inner workings of various computer systems. His journey in this field is marked by over 12 years of dedicated experience, which includes specialized skills in writing comprehensive reviews, conducting thorough testing of computer components, and engaging in extensive research related to computer technology. Despite his professional engagement with technology, Dominic maintains a distinctive disinterest in social media platforms, preferring to focus his energies on his primary passion of understanding and exploring the complexities of computer hardware.
4 Comments
Oldest
Newest
Inline Feedbacks
View all comments