How to fix program is not recognized as an internal or external command errors
This used to be a common issue before Windows 10 as Windows 7 and 8 had an annoying habit of using %SystemRoot% or helpful system administrators would add it as the default program path. It also happened occasionally when registry changes had been made with or without the user’s permission. If you’re seeing ‘program is not recognized as an internal or external command’ here is how to fix it.
The full error syntax is ‘PROGRAM is not recognized as an internal or external command, operable program or batch file’. Where you see PROGRAM, it would be a command, app or program you are trying to use or open that prompted the error.
Usually you see this error when using the command line. For example, if you are running Netstat, you would see ‘Netstat.exe is not recognized as an internal or external command, operable program or batch file’.
The error syntax indicates that there may be something wrong with the command, but there isn’t. It isn’t the command itself but the path used to access that command. In the above example, if you look in C:WindowsSystem32 you would see Netstat sitting there. The same would likely be true for whatever command you were using or program you were trying to call.
Fix program is not recognized as an internal or external command
The fix is quite straightforward but you would be forgiven for not realizing what it was given the poor error syntax.
First we need to open a CMD window as an administrator.
- Right click Windows task bar and select Task Manager.
- Select File and Run new task.
- Type cmd into the window and check the box next to Create this task with administrator privileges.
Then:
Type ‘set path’ and hit Enter. You should see a return like the main image for this tutorial. A list of paths that Windows uses to find programs or commands.
If you have ‘C:WindowsSystem32’ it is starting well. If you see ‘%SystemRoot%’ it could be that entry causing issues.
- Type ‘control’ into the Cortana/Search Windows box and select Control Panel.
- Select System and Advanced system settings.
- Select the Environment Variables at the bottom of the Advanced tab.
- Highlight Path in the bottom box and select Edit.
- Make sure C:WindowsSystem32 is present. If it is, delete it and add it again.
- Confirm and close all windows and retest.
- If the retest fails, repeat this process and delete the %SystemRoot% entry.
In the vast majority of cases, adding, or re-adding C:WindowsSystem32 to the path will fix the ‘PROGRAM is not recognized as an internal or external command, operable program or batch file’ error. Otherwise, removing the %SystemRoot% entry should do the trick.
As long as you have C:WindowsSystem32 present, you shouldn’t need %SystemRoot% as they point to the same place. Plus, %SystemRoot% is known to cause issues when used as a system path on some configurations. There are applications out there that add registry entries that directly conflict with %SystemRoot% which is why removing it should work.
If you find issues with other programs not executing, you can repeat the above steps and reverse your changes. Just perform steps 1 to 4 and instead of Delete, select New and add the path you changed. Adding a path should not affect your computer in any way. It is most likely removing a path that would cause issues. If that is the case with your computer, just add %SystemRoot% again.
Another way to fix program is not recognized as an internal or external command
If those two path changes don’t work, there is a workaround. You can simply put a shortcut to the program into C:WindowsSystem32 and that should make everything work fine.
- Right click the executable you are trying to use.
- Select Send to and Desktop to create a shortcut.
- Open Windows Explorer at C:WindowsSystem32.
- Drag the shortcut you just created into the System32 folder.
This is a less that optimal solution but can get the job done. It is much better to resolve the error with the correct paths than by creating a referral shortcut but it works when you need it to.
This is another prime example of coders at Microsoft writing error syntax for themselves rather than users. What the error tells you is nothing to do with what is actually wrong. Good job sites like TechJunkie are here to help!
Have you fixed program is not recognized as an internal or external command errors any other way? Tell us about it below if you have!
One thought on “How to fix program is not recognized as an internal or external command errors”