From: James Yonan In-Reply-To: Message-ID: References: MIME-Version: 1.0 Subject: [Openvpn-devel] Re: Windows install pkg leaves a ; in path Sender: openvpn-devel-admin@lists.sourceforge.net Errors-To: openvpn-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Date: Sun Feb 13 19:25:27 2005 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit To: Mathias Sundman Cc: openvpn-devel@lists.sourceforge.net, markku@...124... 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