Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes, my command prompt cannot find the PATH variable. I have this occasional problem at work where when I open command-prompt and run commands like ipconfig or subst, I get an error saying something like 'ipconfig' is not recognized as an internal or external command. When I try this echo %path%, it prints out %path% instead of the PATH value. If I look at my Environment Variables window, the PATH is defined right there but I don't know why CMD can't find it. At this point, I understand why the other commands were not being recognized since their paths are in PATH variable.

However, I cannot understand why the PATH variable is not being found. If I restart the computer, everything is back to normal. In a few days, I might have the same experience again.

I tried using this answer. It suggested changing a registry value but mine already had the value that was suggested yet it wasn't working. (The restart step at the end would have solved it as usual but that's not the point.)

Any suggestions regarding why the PATH variable may become invisible every now and then and how I can prevent it from happening again?

share|improve this question
1  
Please specify the complete path as seen in the "Environment Variables window". Both your user path and system-wide path. (You can edit them in your question.) You could have run a program which deletes the path-variable (until reboot). I take it the set path-command gives no path-variable at that point and echo %systemroot% works as expected (giving C:\Windows)? (so expanding is working) –  Rik Oct 31 '13 at 21:45
add comment

1 Answer

This can be a problem when you have a very long PATH variable and/or a huge amount of other long environment variables set. It can also happen if you have spaces next to your semicolon delimiters and if you have a % as the first character in your path.

You may have some luck with FixPath which fixes some common path problems automatically.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.