I have a system PATH variable with the system level config. I use the user PATH variable to complement the PATH with user-specific config.
I would like to update the user PATH variable from command-line for example with setx.
But I don't know how to reference the existing user path in setx.
In the following command (setx without /M)
setx PATH c:\my-user-specifc-bin-path;%PATH%
the first PATH means user PATH but the second %PATH% will be substituted by the "full" (user + system) PATH.
So it means that the entire system path would be duplicated in the user PATH... what is definitively not what I want.
I would like to:
- Affect only the user PATH environment variable
- Append/Prepend one or more path element to the existing value
- Do it from the command-line.