I am sure you had tried launching programs like ‘CMD’, ‘DISM’ directly from the Run prompt. Ever wondered how they launched instantly? How is Windows OS able to find where its located? A simple example is when you create a shortcut of a program, the shortcut knows where the program is located, and launches it easily. The OS keeps a list of path 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. In this guide, we 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 make sure that it exists. This can even happen with the RUN prompt which is invoked using 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. This 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 go and 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 with 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 if you have a bunch of them available in the folder, just add the path to this. Next time you want to run, just type the name, and it will launch the program. This is majorly used by programmers to add references to their program.