setx command not recognized on Windows10
Asked Answered
L

3

10

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?

Leptorrhine answered 27/12, 2015 at 16:16 Comment(5)
How are you using the command?Infantilism
"Using" is a funny word to use since it does not recognize the command. But both just "setx" and "setx /?" gives the not recognized replyLeptorrhine
Ok. didn't see that you already tried setx /?Infantilism
already asked here: superuser.com/questions/1018513/…Hartman
Ok I saw this : #16140020 and it says you need to check C:\Windows\System32 should be in your PATH env variable.Infantilism
L
4

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?

Leptorrhine answered 27/12, 2015 at 16:58 Comment(0)
C
2

In some cases, it might be because you are in powershell or some other terminal, not in the "command prompt" terminal (remember to open it with admin)

Caryncaryo answered 30/12, 2023 at 23:59 Comment(0)
A
0

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

Abram answered 3/1, 2018 at 5:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.