Overcoming the 1024 character limit with setx
Posted
by
Madhur Ahuja
on Super User
See other posts from Super User
or by Madhur Ahuja
Published on 2012-02-08T19:27:24Z
Indexed on
2012/04/07
23:33 UTC
Read the original article
Hit count: 4930
I am trying to set environment variables using the setx
command, such as follows
setx PATH "f:\common tools\git\bin;f:\common tools\python\app;f:\common tools\python\app\scripts;f:\common tools\ruby\bin;f:\masm32\bin;F:\Borland\BCC55\Bin;%PATH%"
However, I get the following error if the value is more then 1024 characters long:
WARNING: The data being saved is truncated to 1024 characters.
SUCCESS: Specified value was saved.
But some of the paths in the end are not saved in variable, I guess due to character limit as the error suggests.
© Super User or respective owner