I am sure you had tried launching programs like ‘CMD’ and ‘DISM’ directly from the Run prompt. Have you ever wondered how they launched instantly? How is Windows OS able to find where it’s located? A simple example is when you create a program shortcut; the shortcut knows where the program is located and launches it quickly. The OS keeps a list of paths where the most common system programs are located, and so when you use the run prompt, it launches it easily. The list is called Windows Environment Variables, and if something goes wrong with it, the programs don’t work. This guide will help you troubleshoot the issue when any command is not recognized as an internal or external command, operable program, or batch file problem.
A command is not recognized as an internal or external command
If you are troubleshooting a program, you need to ensure it exists. It can even happen with the RUN prompt, invoked using the WIN+R shortcut. So go to C:\Windows\System32\ and see if the program exists. You can also try searching for the EXE in the System 32 folder. Once you are sure it’s there, let’s fix the problem.
Modify Environment Variables
Use WIN + X and then select System. It will open the section where you get to see all the Properties of the PC.
On the left pane, select the Advanced system setting. Click on Environment Variables.
Under the System Variables locate Path and choose EDIT.
Before you edit, copy this entire string and paste it into Notepad. In case something goes wrong, you can paste it back.
Look for a directory path ‘C:\Windows\System32‘; if it’s not there, you need to add a semi-colon at the end.
Click OK to save, and then exit.
After this, you will need to reboot the computer. All the paths are picked up when the computer reboots.
Now you need to try executing those programs where you received – “…is not recognized as an internal or external command, operable program or batch file” error message and see if the problem is fixed or not.
Now, here’s a pro tip! If you wish to launch a custom batch file or have many available in the folder, add the path to this. Next time you want to run, type the name, and it will launch the program. Programmers majorly use this to add references to their programs.
You may receive this “…not recognized as an internal or external command” error message while running various tools or applications like Telnet, SQLPlus, Java, Bootrec, WMIC, ADB, PIP, Winget, RSTRUI.exe, etc. The linked posts offer additional troubleshooting steps.
What is an internal or external command?
An internal command is available in Windows and usually works from Windows Terminal or Command Prompt. External commands, on the other hand, are not dependent on system variables or the OS. Instead, they use their own set of libraries.
How do you make the external commands available in Windows Terminal?
If you want to execute any external command from any terminal, you will need to include the program’s path in the terminal settings. As explained above, you must include them in the System Variables locate Path, and the terminal will be able to find it when you execute it. For example, many people have complained about Flutter not being available as an internal-external command, and all you need to do is include the path of the application.