= Introduction = The NSI script in [https://github.com/OpenVPN/openvpn-build openvpn-build repository] makes use of [http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries EnvVarUpdate.nsh] to append ''OpenVPN\bin'' to the system-wide PATH variable on Windows. When using default NSIS builds, PATH can't be longer than 1024 characters or OpenVPN install destroys it. To support longer PATHs you need rebuild ''makensis'' with larger ''NSIS_MAX_STRLEN''. = Rebuilding NSIS on Ubuntu 12.04 = Here we rebuild ''nsis'' and ''nsis-common'' Debian packages with custom configuration. First we need some tools: {{{ $ apt-get update $ apt-get install apt-src }}} Next fetch the NSIS sources: {{{ $ apt-src install nsis }}} Next open ''nsis-2.46/debian/rules'' in a text editor and add ''NSIS_MAX_STRLEN=8192'' to the suitable place: {{{ SCONSOPTS_NSIS := $(SCONSOPTS) NSIS_MAX_STRLEN=8192 SKIPUTILS=$(IGNORE_UTILS_NSIS) SKIPDOC=COPYING SCONSOPTS_COMMON := $(SCONSOPTS) NSIS_MAX_STRLEN=8192 SKIPUTILS=$(IGNORE_UTILS_COMMON) SKIPDOC=COPYING }}} Now build the packages: {{{ $ apt-src build nsis }}} Finally, install the customized packages using dpkg: {{{ $ dpkg -i nsis_2.46-* nsis-common_2.46-* }}} If you now rebuild openvpn, the installer should support appending to long PATHs. = Installing patched nsis_2.46 Ubuntu packages = Instead of patching and building nsis yourself, you can try installing standard nsis packages from Ubuntu 12.04 repositories and then installing [http://build.openvpn.net/downloads/packaging these nsis packages] on top of those. Their build number is set high to prevent standard packages from overwriting them during system upgrades.