On Sun, 13 Feb 2005, Mathias Sundman wrote: > When uninstalling OpenVPN, the installation package leaves a semicolon at > the end of the path. > > When OpenVPN is then re-installed, another semicolon is added to the path > before the openvpn path, and you therefore end up with two semicolons > before the OpenVPN path. > > Every time you install a new version of OpenVPN an extra semicolon is > added! > > I have solved this in the OpenVPN GUI installation package simply by > changing > > ; remove previously set path (if any) > Push "$INSTDIR\bin" > Call RemoveFromPath > > to > > ; remove previously set path (if any) > Push ";$INSTDIR\bin" > Call RemoveFromPath > > in the two places RemoveFromPath is called from the NSIS script. > > I guess a more "correct" solution would be to fix the setpath.nsi > RemoveFromPath function so it removes the preceding semicolon if a such > exists. > > Thanks to Markku Leinio for reporting this problem.
The problem with prepending a semicolon is that it won't match if the OpenVPN path is the only path the user's PATH setting. I just tried to update using this patch and I ended up with two OpenVPN paths. Maybe something like this? ; remove previously set path (if any) Push ";$INSTDIR\bin" Call RemoveFromPath Push "$INSTDIR\bin" Call RemoveFromPath A bit ugly -- maybe we should fix RemoveFromPath? James