7

I am installing software on a new laptop with (unfortunately) Windows 10 and the setx command is not recognized:

'setx' is not recognized as an internal or external command

I have Googled this, but can't find anything related to setx and Windows-10.

Do I need to do something specific to enable this command on Windows-10?

mybrave
  • 1,662
  • 3
  • 20
  • 37
Plaul
  • 7,191
  • 5
  • 19
  • 22

2 Answers2

5

The answer was given by svasa. It is strange but it worked. The strange thing is that it always was defined in my path, but as "%SystemRoot%\system32". Capitalizing system32 solved the problem. But this was an all new laptop, so I assume this wrong setting came from Microsoft?

Plaul
  • 7,191
  • 5
  • 19
  • 22
0

In my case I had to run my batch file as Administrator or from an Administrator command prompt.

Noumenon
  • 5,099
  • 4
  • 53
  • 73