dmd installer clobbers PATH on Windows (sometimes)

Brad Anderson eco at gnuk.net
Mon Aug 1 10:58:08 PDT 2011


The NSIS script used to update the environment variable (EnvVarUpdate) has
the following warning [1]:

"Warning this code will replace paths rather than append if the existing
path exceeds the maximum string length in the NSIS build you are using. Some
setup crash can also occurs."

The default maximum string length is 1024.  There is a special build of NSIS
[2] which has a larger maximum string length (8192) that would help avoid
this problem.  There is also a patch [1] for EnvVarUpdate that detects if
the PATH will be overwritten instead of appended to and tells the user to
update their PATH manually.

I've seen this issue complained about before online but
hadn't experienced it myself until recently.  It can be a rather frustrating
problem to experience as restoring your PATH isn't trivial because there is
no way (that I know of) to look at what your PATH was before it was
destroyed and the PATH is often updated by installers (as it is with dmd).

[1]
http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries#Warning
[2] http://nsis.sourceforge.net/Special_Builds

Regards,
Brad Anderson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110801/205e3ad3/attachment-0001.html>


More information about the Digitalmars-d mailing list