1

I want to add a few lines to Windows system variable path.

The batch file I have now appends these lines to user variable, not system variable.

How do I need to change it in order to append to system variable?

Here's my batch command:

SETX path "%PATH%;C:\development\sdk\tools;C:\development\sdk\platform-tools"

Forza
  • 1,619
  • 3
  • 28
  • 49

1 Answers1

1

use setx /M to modify the system var (HKEY_LOCAL_MACHINE), by default it modifies the HKEY_CURRENT_USER

Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103