Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed an application that screwed my PATH variable. Now I cannot run anything from the command prompt. Is there any way I can restore PATH variable?

share|improve this question
Had the same thing happen to me after I installed Delphi 7 ent. Luckily I'm running Windows 7 and some other fella showed me the way at another thread! – user191311 Jan 19 at 21:55

5 Answers

up vote 20 down vote accepted

Got the answer on Experts Exchange. Here is the excerpt:

Start regedit and check for the "Path" value in HKLM\System\ControlSet<xx>\Control\Session Manager\Environment (replace <xx> with all numbered ControlSet entries that are present. No need to check CurrentControlSet, it's one of the ControlSetxx keys, and you won't find anything under there.)

These are the "Last Know Good" configurations; if you're lucky, there's still one left that has a path variable.

If not, the bare minimum required is this:

C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem
share|improve this answer
2  
Can't view the above solution without providing experts-exchange.com some payment details :( – AffineMesh Feb 26 '10 at 5:14
Please update your answer with some details of what you found in that link. – hlovdal Feb 26 '10 at 15:57
2  
+1 Thank You! (sigh of relief) – Joe Jan 9 '12 at 3:12
+1 Save the day! :) – Pagotti Sep 13 '12 at 21:01
this saves my job! – Ewerton Oct 8 '12 at 19:19
show 1 more comment

The default environment variables are stored in the registry under following key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Set the path variable to its default value here:

"C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem"
share|improve this answer

A system restore should restore the PATH variable.

share|improve this answer

Windows XP System Environment Variables

The key is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

The value is

Path REG_EXPAND_SZ %SystemRoot%\;%SystemRoot%\system32\;%SystemRoot%\system32\wbem\

That's it.

share|improve this answer

http://www.computerhope.com/issues/ch000549.htm

Did you use google at all?

Note: If you had other applications installed before you damaged your path variable, you need to make certain they are also placed on your PATH.

The path variable is a simple list, with semicolon delimitation.

share|improve this answer
If you want to earn some of those rep points back, you should expand by explaining what is found in that URL that helps the original post. It also helps keep the site clean of links that expire – Luke Jun 12 '12 at 16:48

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.