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.

I don't know why, but terminal commands aren't working on Windows anymore.
Is there something I can look at to see what may be broken?

Does anyone know what might have cause this? Or how to repair it?

enter image description here

share|improve this question

1 Answer 1

up vote 1 down vote accepted

So far, all the commands you've listed are "external" commands - commands not built-in to the CMD interpreter. I'm guessing commands like dir, cd, and cls still work? If internal commands still work, try running SET PATH to see if your path variable is still intact. Specifically, make sure it includes %WINDIR%\System32 (where %WINDIR% should be the actual, fully-qualified path to your Windows installation). Without that folder in the PATH variable, the OS won't recognize many common "external" commands.

Another way to check your PATH variable is to use ECHO %PATH% (typed exactly as shown here). If the system returns the exact text %PATH%, then that means the variable is not set at all. Otherwise, it should return the variable's value - look for your System32 directory in that string.

If the System32 directory is absent from path, here's how to restore it:

  • Right-click My Computer, select Properties.
  • From the task pane on the left, select "Advanced system settings".
  • In the System Properties dialog, go to the "Advanced" tab, and click "Environment Variables...".
  • In the System variables list, scroll to and double-click the "Path" variable.
    • NOTE: If there is no "Path" variable, create one (no quotes in the name) and omit the semicolon from the next step.
  • At the end of the variable value, add a semicolon followed by the path to your System32 folder.
  • Click OK through all three open dialogs.
  • Close all open CMD windows, open a new one, and try the external commands again.
share|improve this answer
    
So my path variable should have a %C:\Windows\System32% in it? –  Frantumn Nov 5 '12 at 19:27
    
@Frantumn Without the two %, yes. –  Iszi Nov 5 '12 at 19:29
    
Works again. Thank you very much! –  Frantumn Nov 5 '12 at 19:31
    
You're welcome. I'd recommend also trying to determine a root cause for this problem, if you can. It is possible that the PATH variable may have been corrupted by a bad software or update installation, or by user error, but some malware may try to manipulate it as well. –  Iszi Nov 5 '12 at 19:35
    
Root cause was me a while back. I was updating the path variable for a JRE, and I didn't realize back then that you could append several path's to one variable with a semicolon. So I removed the line, and replaced it with the JRE. I probably removed a few things that I shouldn't have. But I'm not sure of any one way to get them all back. I've since added a few more back, and this is an important one. –  Frantumn Nov 5 '12 at 19:46

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.