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.

Command prompt cannot find such common commands as ping, ipconfig etc until I navigate to system32. But PATH variable contains %SystemRoot%\System32\.

What problem could be?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

If you're sure that the contents of PATH variable are correct, then check the registry:

  1. Open regedit.exe
  2. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  3. What's the type of "Path" registry key? If it's not not REG_EXPAND_SZ then this could be the problem.
  4. You can change it to REG_EXPAND_SZ by doing this:

      * Double Click “Path” and copy it’s Data Value “…%SystemRoot%system32;%SystemRoot%; …”
      * Delete the “Path”
      * Create New > Expandable String Value
      * Give “Path” as the name, double click it, and Paste the value copied in the previous step to the “Value Data” field
    
  5. Close the Regedit window and restart
share|improve this answer
    
Thank you! It worked. Anyway, could you explain the difference? –  DixonD Nov 24 '10 at 9:49
    
They are just different Registry Value Types. It could be that some recently installed program has changed the type to REG_SZ which makes the Path variable unusuable. So if you can recall what you have recently installed then you can test which installer messes it up :) –  Siim K Nov 24 '10 at 10:52
    
But why does REG_SZ type make the Path variable unusable? –  DixonD Nov 24 '10 at 11:48
    
Because then the command prompt interpreter does not replace the %variables% (like %SystemRoot%) variable with its value. Probably you could use REG_SZ type but then you'd have to write out the full paths, i.e. c:\windows\system32 instead of %SystemRoot%\System32\ –  Siim K Nov 24 '10 at 12:04
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.