19
9
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?
19
9
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?
26
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
2Can't view the above solution without providing experts-exchange.com some payment details :( – AffineMesh – 2010-02-26T05:14:38.003
Please update your answer with some details of what you found in that link. – hlovdal – 2010-02-26T15:57:56.973
For the record, this also works on Windows 7. – Corey Ogburn – 2013-05-09T14:46:15.450
6
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"
1
A system restore should restore the PATH variable.
1
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.
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!
– k9dog – 2013-01-19T21:55:18.293