How to Fix “not recognized as an internal or external command” in Windows

Configurare noua (How To)

Situatie

This is actually one of the most common errors you can face with the Command Prompt. As the error itself suggests, it couldn’t recognize the tool you were trying to use with the Command Prompt. There are various reasons why it happens, and also there are multiple ways to get around the “not recognized as an internal or external command” error on your Windows PC.

Solutie

Pasi de urmat
Ensure The Program Actually Exists On Your PC

The first thing to do is verify if the program that you’re trying to use with the Command Prompt actually exists on your computer. You may have used a fake installer that told you that the program was successfully installed on your machine, but that may not be true.

  • Launch a File Explorer window on your PC.
  • Head over to the following path.
  • C:\Windows\System32\

Ensure the executable that you’re trying to run from the Command Prompt is available in this folder. If it’s not, the program is likely not installed on your computer. The above isn’t a surefire way to check if a program is installed on your computer. This is because not all programs keep their files in the Windows’ System32 folder. However, it should help you locate most programs.

Use The Full Path To The Executable File

The “is not recognized as an internal command” error usually occurs because the computer can’t find the executable that you’re asking it to launch.

  • Type in the full path of the executable that you want to use and hit Enter on your keyboard.
  • For example, if you’re trying to use adb.exe that’s located in a folder called adb on your desktop, you’ll type something like the following.C:\Users\<username>\Desktop\adb\adb.exe

By now, you know that when you try to run an executable from the Command Prompt utility, it looks into the System32 folder of your Windows installation and then opens the file, if it’s available there.

What if you could place your executable file there and then access it from the Command Prompt? You can do this as long as you have admin access on your computer.

  • Copy the executable file along with all other files associated with it to the following folder on your computer.C:\Windows\System32
  • Close Command Prompt if it was already open and relaunch it.

Add The Executable File Path To Environment Variables

The most efficient way to fix the “is not recognized as an internal command” error is to edit your environment variable and add the appropriate file path there. This is because the Command Prompt utility looks at those paths when you enter a command, and then opens the file if it finds it in one of those directories.

By adding your file path there, you’re telling Command Prompt where a certain executable is located when you want to use it by its short-name in a CMD window.

It’s pretty easy to edit your variables and add a new path there.

  • Launch Control Panel using the Cortana search on your PC.

  • Find and click on System on the following screen.

  • Select Advanced system settings from the left sidebar on your screen.
  • A box will open on your screen. Click on the Environment Variables button which is located at the bottom of the box.

  • You’ll see all the user variables for your account. Click on the one that says Path and then click on the Edit button.

  • You can now add the new path to the application you want to use with the Command Prompt. Click on Browse in the right sidebar to add a directory to the list.
  • Navigate to the folder where your executable is located and select it.
  • You should see your newly added path is listed in the variables list. Click on OK at the bottom to save the changes.

Tip solutie

Permanent

Voteaza

(13 din 25 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?