-->

5 Ways to Overcome Is Not Recognized As An Internal Or External Command In Windows

5 Ways to Overcome Is Not Recognized As An Internal Or External Command In Windows

5 Ways to Overcome Is Not Recognized As An Internal Or External Command In Windows


 The Command Prompt is a handy way to do certain tasks, but sometimes it doesn't recognize what you want and issues the error message “is not recognized as an internal or external command”. Here's how to fix it.


Command Prompt in Windows is a useful utility. It allows its users to multitask quickly. However, the command processor may display an error message “is not recognized as an internal or external command” when you try to run commands like php, python, pip, adb, javac, npm, composer, and many more.



This is a common error and usually occurs due to incorrect command execution. This article will explain the causes and some troubleshooting steps to help you fix this error.


Why does the error message Is Not Recognized As An Internal Or External Command Appear?


The Windows operating system maintains a list of paths known as Windows Environment Variables to quickly launch and run programs. Any problem with it can cause an error. Potential issues that cause this error include:

* Wrong order.

* Registry entries interfere with command functions and more.

* Executable program or script not installed.

* Incorrect path or file name specified.

* Missing file directories in Windows Environment Variables.


How to Overcome Is Not Recognized As An Internal Or External Command


This error is often triggered when you run a CMD program or command, and something goes wrong. We have listed several methods to solve the error is not recognized as an internal or external command, so follow the ones that are relevant to your case.


1. Check if the Program is Installed


Command Prompt can't run non-existent programs. If you are trying to run a recently installed program, make sure it is installed correctly. To check if the program is installed, follow the steps below:

Check If Programs Are Installed

1. Press Win + R to open the Run box. Then, type control and click OK.

2. Then, in Control Panel, go to Programs > Programs and Features.

3. Scroll through the list of installed applications and find the application you want to run.


Alternatively, you can also view installed applications by accessing Apps and Features in Settings. To do this, press Windows key + I, click Apps and locate the installed application.


By default, when you try to launch a program or script from CMD, the command processor looks for files and their associated paths in the System32 folder or environment variables. If the file is missing, it will return an error message is not recognized as an internal or external command, operable program, or batch file error.


This may be because Windows doesn't install most of the applications in the System32 folder, but C:\Program Files instead. You can solve this problem in three ways:

1. First, use the full path of the executable file to launch the program.

2. Second, add the program path to the Windows environment variables.

3. Finally, move the files to the System32 folder.


2. Use Full File Path To Execute Command


First, let's try the full path method. Here, we will use the full file path rather than the application name to launch the program from the Command Prompt. Here's how to do it:

Use Full File Path To Execute Command

1. First, open Command Prompt as administrator.

2. Next, type in the full path of the app you want to launch. For example, if you wanted to open the ESBCalc Port which is located in the C:\ directory, then the command to open the application with the full path would look like this: C:\ESBCalcPort.exe.

3. Some say, it will only work if the file path has no white space. If your file path has spaces, type the file path inside double quotes.


3. Use Full File Path In Double Quotes


Use Full File Path In Double Quotes


Command Prompt reads white space as the end of the command and treats anything after the space as a separate command.


Let's say you want to launch the Google Chrome application which is located at C:\Program Files\Google\Chrome\Application\chrome.exe via CMD. However, running this file path will return an error due to space between Program Files and Google Chrome.


To avoid this you can enclose the file path in double quotes. Here, the command to launch Google Chrome will look something like this:

"C:\Program Files\Google\Chrome\Application\chrome.exe"


4. Add File Path To Windows Environment Variables


You can edit the Environment Variables and add your application's file path to its directory. This way, Command Prompt will identify the path for the entered command and execute it without errors.


Adding the full file path to Windows Environment Variable can help you solve the error is not recognized as an internal or external command for Flex, nmake, make, cobra, Is, terraform, gcc, code, Android Studio, Python, Fastboot, and ADB commands. To edit Windows Environment Variables, follow these steps:

Add File Path To Windows Environment Variables

1. Press Win + R to open Run.

2. Next, type control and click OK to open Control Panel.

3. Go to System and Security > System. On the left pane, click Advanced System Settings.

4. On newer versions of Windows 10, go to Settings > System > About. Then, click Advanced system settings Advanced system settings under the Related settings section.

5. On the Advanced tab, click the Environment Variables button.

6. In the new window, under System variables, select Path variable.

7. Click the Edit button.

8. In the Edit window, click New.

9. Here, you have to paste the program file path that you want to run from CMD. For example, if you wanted to run the Chrome browser which is located at C:\Program Files\Google\Chrome\Application, then the full file path would look like this: C:\Program Files\Google\Chrome\Application.

10. Click OK to add it to the Environment Variables.

11. Then, click OK on all open windows to save changes.


Once you've added the new environment variable, open Command Prompt, enter the program name, and CMD will open it without error.


5. Move Files To System32 Folder


System32 is a protected system folder. When you try to launch a program as administrator, the Command Prompt looks for executable files in the System32 folder. However, since all programs are not installed in the System32 folder, you may encounter errors.


If you still want to run the program from CMD and don't want to type in the full file path, you can move the program files to the System32 folder. Here's how to do it:

Move Files To System32 Folder

1. Navigate to the installation directory for your program and copy all the files in the folder. Here, we will move the Google Chrome files located at C:\Program Files\Google\Chrome\Application to the System32 folder.

2. Next, navigate to the C:\Windows\System32 folder and paste the copied files. Click Yes if the UAC prompt appears.

3. Next, open Command Prompt as administrator, type chrome, and hit enter. CMD will immediately open the Google Chrome browser.


Conclusion


So those were some ways to deal with is not recognized as an internal or external command. Command Prompt commands are not case sensitive, but they do forgive extra whitespace. To solve this error, check if the command is correct and use the file path with spaces in double quotes. For programs not installed in the System32 folder, add an environment variable with the full file path of your application to launch the application via CMD.


Also, read the article about 5 Ways to Overcome Kernel Mode Heap Corruption. And see you in another article. Bye
Read Also :
DotyCat - Teaching is Our Passion