0

I am trying to set a persistent system variable. This is for a process in which a batch file refers to the variable, and then edits the variable at the end of the process.

I am using setx with the /M parameter, however, it continues to create the environment variable under the local user instead of the system.

The command I am specifically running is:

setx FN 101 /M

What am I missing?

Marek Puchalski
  • 3,286
  • 2
  • 26
  • 35

1 Answers1

0

I did not launch an elevated CMD. Turns out in order for the /M parameter to work, CMD must be run as an administrator.