dmd installer clobbers PATH on Windows (sometimes)

Johann MacDonagh johann.macdonagh.no at spam.gmail.com
Tue Aug 2 15:34:23 PDT 2011


On 8/1/2011 1:58 PM, Brad Anderson wrote:
> 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

Thanks for looking this up. This *has* happened to me, and I've seen a 
few posts on reddit where this happened to someone else as well.


More information about the Digitalmars-d mailing list