The question pretty much says it all; I have users who do not have permission to edit their own PATH environment variable and if they need to have it modified for some reason, they need to log out so an Admin can log in and change the PATH for them, before the user logs back in again. This isn't ideal. Can it be done in a better way?
| |||
feedback
|
|
You can always invoke a cmd shell with administrator rights (or any other runas method), and use a tool such as SETX to modify the path permanently. Existing shells and/or running programs will probably be using the old path, but any new shell/program will use the new settings. | |||
|
feedback
|
|
In a command prompt you can do:
but this only changes it for the command prompt (and any apps launched from the command prompt). Assuming you want this to apply to everything the user does you change the users environment variables. Right click My Computer, Properties, Advanced, Environment variables and in the "User variables for add a variable:
When the user logs in this gets added to the system wide path. JR | |||
feedback
|
|
The user can set a PATH variable at a command-prompt that will override the system-wide PATH variable, even if the user doesn't have "Administrator" rights. The change will take effect for new processes the user starts from that command prompt. (The existing Explorer process, and any other processes the user is running when the change is made, will not "see" the change.) | |||
|
feedback
|
|
My Computer / Properties / Advanced / Environment Variables. Changes there take effect immediately except for already open command prompt windows. No need to log out and back in. | |||
feedback
|