Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
miskox
- Posts: 631
- Joined: 28 Jun 2010 03:46
#1
Post
by miskox » 14 Nov 2024 01:43
I would like to add a path (for example c:\test) to *system* variable (not user variable). Press WIN+R and type SystemPropertiesAdvanced and press ENTER. Click on 'environemnt variables'. At the top are user settings and at the bottom systemwide settings. And instead of adding a new path to the system PATH variable I would like to use SETX command. But I get this error:
Open cmd as Administrator:
Code: Select all
C:\WINDOWS\system32>setx path %path%;c:\TEST /m
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
C:\WINDOWS\system32>
I don't have a virtual machine to test this so I don't want to corrupt the PATH variable.
Anyone has a solution?
Thanks.
Saso