Windows command line error:
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
Summary:
You use the setx command and assign it several tokens when only one is allowed.
How to reproduce this error in Windows:
Windows cmd . :
C:\Users\Charity>setx FANCYPANTS string with spaces
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
, :
C:\Users\Charity>setx FANCYPANTS "string with spaces quoted"
SUCCESS: Specified value was saved.
C:\Users\Charity>
, cmd .
C:\Users\Charity>echo %FANCYPANTS%
string with spaces quoted
. .
C:\Users\Charity>setx FANCYPANTS ""
SUCCESS: Specified value was saved.
cmd , . .
C:\Users\Charity>echo %FANCYPANTS%
%FANCYPANTS%
FANCYPANTS .