How to add to SYSTEM "PATH" environment variable in windows 10 via cmd, not to user's one?

By using setx "%path%;c:\whateverFolder I just copy system path variable to users one, therefore duplicating it, and only after it the required folder is added. Is it possible to add it to SYSTEM path variable. not to the users path and if it is, how can I do it?

1

1 Answer

You can still use the setx command, by adding the /m parameter:

/m Specifies to set the variable in the system environment. The default setting is the local environment.

Like this:

setx /M path "%path%;C:\your\path\here\"
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like