Need to recover older $PATH setting

2020-05-28 10:33发布

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

标签: path recover
2条回答
虎瘦雄心在
2楼-- · 2020-05-28 11:22

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

查看更多
\"骚年 ilove
3楼-- · 2020-05-28 11:25

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

查看更多
登录 后发表回答