Need to recover older $PATH setting
Asked Answered
H

2

8

I have just installed an app which overwrote my $PATH variable... so now, a bunch of stuff will not work. While I have a full backup, I am hoping that there is an easier approach than to restore, get the PATH, the "roll it forward" again.

Is there a location in the windows registry (or anywhere else) that stores an older $PATH setting?

Thanks, GS

Hecklau answered 31/10, 2011 at 16:10 Comment(1)
As far as I know, the only "backup" registry files that exist outside of system restore points are in \windows\system32\config, and are created at first-install, then left alone - this backup'd be unlikely to have your custom path in it.Huambo
H
26

If anyone is interested, I found the answer... using REGEDIT, it is under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment or HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\Environment

In my case, it was under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002...

GS

Hecklau answered 1/11, 2011 at 0:10 Comment(3)
This answer has just saved me from terrible OS fixing job! And my case is same as the original answer, not sure whether it is a coincidence or some other reasons.Borscht
i dont have a controlset002Tuyere
I have a path variable under controlset001, but its the wrong one. after i accidentally deleted System Path i made the mistake of copying and setting System Path to User Path. Should I delete the incorrect Path before doing a system restore?Tuyere
M
-2

type in cmd:

set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;

above code will set the path temporarily. To set permanently, add %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; to System Properties -> Advanced System Settings -> Environment Variables

Mannie answered 17/8, 2015 at 22:49 Comment(2)
Welcome to SO! Try to provide more explanation to your answers. See How to answer page for help in improving your answer.Quindecennial
doesnt help restore the custom path variable before deletionTuyere

© 2022 - 2024 — McMap. All rights reserved.