Need to recover older $PATH setting

旧街凉风 提交于 2019-12-03 13:58:49

问题


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


回答1:


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




回答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



来源:https://stackoverflow.com/questions/7956365/need-to-recover-older-path-setting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!