There are cases when software installers mess up our Windows environment variables. When the environment variables get messed up, it could lead to trouble with other programs that share the same environment variable. One such symptom is the following error in Windows:
“command” is not recognized as an internal or external command, operable program or batch file.
This happened to me when I was trying to run ping from the command line. Suddenly it throws me the same error as above. I know for sure that I could not have deleted the ping executable file so I suspected that it is the path variable to ping that is messed up. I double checked that the ping.exe exists in the WINDOWS\system32 folder.
To access the environment variables right click the My Computer icon then choose properties. Select the Advanced tab and then click Environment Variables.
At the system variables panel, choose Path then click the Edit button.
I would recommend copying this value and pasting it on Notepad first before editing. Save the old value as a text file so you will have a backup of the original value.
Edit the variable value. It is a long string separated by semicolons. Make sure the executable file’s location is one of the entries on this string. If it is not, enter the location of the executable file.
Click OK after editing the value. Reboot the computer to enable the new value. After rebooting, try executing the command again and verify that it fixed your problem. If it doesn’t, double check the value of the path variable again. It could be a bad syntax with the semicolons or a wrong value is entered.
Ben Carigtan shows you how it’s done.




I recently had to deal with this fun issue and found a few other items could cause the problem. One specific one is if %systemroot% is used in the PATH variable instead of "C:Windows" or "C:WINNT". There is a registry key that can be messed up by other installs to point %systemroot% to the wrong location. In my case, it was pointing to C:Windows but our environment uses C:WINNT. In order to keep from breaking the program that changed it I just added C:WINNT as well as the %systemroot% options to the PATH variable.
Hi,You just need to do one thing..if all executable files are present in system 32 folder..Just add the path entry of C:/windows/system 32 folder in environment variables..
thank you for the help for the edit command in variables :)
This is not working!…I have changed the path restarted the comp and it still does not fix my error!
Tarun, thanks for your commenting because you saved my life!!! I was missing "C:windowssystem32" so I just added that in and command prompt works again!!!
I'm so happy, because a lot of commands kept getting errors, but, now it's fixed.
I having the same problem and follow the solution provided here, but still the same. Any other recommendation?
I had the same cockup with the %systemroot% variable. Who invented that as an idea so it could be broken? We still have to use absolute paths anyway to fix it!
I got this error when launching batch files from the scheduler. But running them from windows was OK, and so was typing in the commands from a command console.
Adding "C:/WINDOWS/System32" to the PATH solved the problem.
Also doesn’t work. Any other suggestions. Thanks a lot!
Thanks very much! That did the trick for me.
Thank you very much. I was suffering from this problem for a long time.
Thanks a lot.
Thanks for the info. I was fed up with Javacc not recognized.
Thanks a lot!!! It helped me, too.
The netdom file is missing from Windowssystem32. Copy it from another computer or from the Internet.
tarun budhrani: Why do you say "C:/windows/system 32"? Is that really corret? I thought it was "C:/windows/system32". Can you confirm if you made a typo? Be very careful about typos.
It STILL doesn't work! Do you have to add it at the end, or delete the whole thing, or do you have to make a system32 folder then put what you need inside it (because i dont have a system32 folder)? I haven't restarted the computer yet, that might be the problem. Can anyone please help?