How to fix “not recognized as an internal or external command” in Windows

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.

Comments [28]

  1. 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.

  2. 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..

  3. thank you for the help for the edit command in variables :)

  4. This is not working!…I have changed the path restarted the comp and it still does not fix my error!

  5. 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.

  6. I having the same problem and follow the solution provided here, but still the same. Any other recommendation?

  7. 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.

  8. Also doesn’t work. Any other suggestions. Thanks a lot!

  9. Thanks very much! That did the trick for me.

  10. Thank you very much. I was suffering from this problem for a long time.

    Thanks a lot.

  11. Thanks for the info. I was fed up with Javacc not recognized.

  12. The netdom file is missing from Windowssystem32. Copy it from another computer or from the Internet.


  14. You can follow the above tutorial or just copy the file to %systemroot% System32.

    For me.. Copying the file (Example: Makecert.exe) to System32 folder always worked.

    Hope this helps,

    Kalyan Revadi

  15. 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.

  16. 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?

  17. I have the following situation:

    I am in a company with 15 machines ( Winxp and Win7) in a Win 2003 Standerd Edition domain. I have to change computer names without changing the properties of accounts of users, Utilizing the comand Netdom in MS-DOS, it tells me the command is not recognized internally or externally, operable program or batch file. Well, my doubt is that, if now I change my path for utilizing the command Netdom, what changes can occur to my machine??

    Thank you soo much!!

  18. Yr guyz!

    I wanted to apply certificate to s60v5 apps.. And for that, i used Martik Sis Signer!

    but now while applying cert, it says not recognized as internal or external command…

    i tried windows32 and systemroot, but no effect…

    Help me yr, em struggling for cert for a month, and now this! =s

    HElp me!

  19. Hi Aseem – thanks for the tip – it solved the problem straight away. Martin

  20. Thanks a lot!!! this solved my issue.

  21. doesn’t work . still shows this damn message when typing in any console, please help me!!

  22. Thanks, it’s now working like it should!

  23. I go through the steps but in the end, it didn’t respond on pasting the path variables on edit system variables. I even used the shortcut keys but it didn’t work.

Leave a Reply

Your email address will not be published. Required fields are marked *