1

How would you add (not change) to the user PATH variable using setx?

I am trying the following:

setx PATH "%PATH%;C:\Users\bearc\Downloads\pathTesting"

But it only changes the whole path variable to the system path, then the path just added e.g pathTesting.

How would I add to this variable and not change it?

Eventually I will add this to my C# program but yeah.

Thanks, Henry.

Psuedodoro
  • 177
  • 2
  • 14
  • I hope the linked post provides a solution, but the short of it is: avoid `setx` for updating the `Path` environment variable and, generally, any environment variables based on `REG_EXPAND_SZ` registry values. – mklement0 Oct 02 '21 at 22:53

0 Answers0