recentpopularlog in

kme : nonadmin   2

Is there any command line tool that can be used to edit environment variables in Windows? - Super User
Looking for a solution to set environment variables without having access to the System control panel in order to do this ( with Eclipse and EGit.
I don't know any tool that does this, but maybe you can use the regcommand:

reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path
to read the current path, and

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /d "newPath" /f
to write your new value.

You need admin rights for hsving right acccess in HKLM. If that is a problem, consider modifying the user specific path setting in HKCU\Environment instead.

Also interesting:
If you need a generic way to set any environment variable and have the changes persist, then setx.exe would be the tool to use. It cannot do the "smart" things you are asking for, though...

setx.exe is included with Windows Vista or later; if you use an earlier version of Windows, you can use the above download link to get it.
windows  registry  environmentvariable  labcomputer  nonadmin  cli  maybesolution  eclipse 
may 2014 by kme

Copy this bookmark:

to read