76
35
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.
1
Look into Rapid Environment Editor which allows you to edit all envirnoment variables graphically (you can also save a backup also).
– ja72 – 2016-12-17T19:46:05.9173Is anyone else bother by this claiming success when it clearly does not do what was requested? Is it not troubling that this doesn't fail while leaving the path exactly how it was? – Chad Schouggins – 2017-07-17T16:00:36.287
Does this still truncate on windows 10? – cowlinator – 2017-07-22T00:52:19.847
1Yes, it does on Windows 10 – Ivan – 2018-03-23T00:26:43.703
There's a list of alternative ways to edit the
– Ehtesh Choudhury – 2013-10-10T05:15:25.397%PATH%
at http://superuser.com/questions/297947