Windows – How to modify a user’s PATH environment variable without logging out

environment-variablespathwindows

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?

Best Answer

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.