Changes between Initial Version and Version 1 of OpenVPN2.5_Windows_MSI_Unattended_Install


Ignore:
Timestamp:
11/21/20 17:30:30 (4 years ago)
Author:
Pippin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenVPN2.5_Windows_MSI_Unattended_Install

    v1 v1  
     1= OpenVPN 2.5 Windows MSI Parameters for Unattended Installations =
     2Barton Nicholls • Nov 19, 2020
     3Source: https://www.cohesive.net/openvpn-2_5-windows-parameters
     4
     5
     6Since the release of OpenVPN 2.5 the OpenVPN Project has moved it’s installer from an EXE (executable file) to the more modern MSI (windows installation file) method.
     7MSI files have some clear advantages so no surprise that they have gone this route.
     8
     9Previously the OpenVPN EXE had well documented installation parameters for their Windows installer:
     10
     11S - silent installation
     12/D=path - specify a custom installation path
     13 '''Note:''' the /D parameter has to appear last on the command line, and the path may not be enclosed in quotes.
     14The installer simply takes all of the command line left, and uses it as path (thus supporting spaces in the path).
     15
     16To select individual OpenVPN components (1 = install, 0 = do not install; the values below indicate defaults):
     17{{{
     18/SELECT_SHORTCUTS=1 - create the start menu shortcuts
     19/SELECT_OPENVPN=1 - OpenVPN itself
     20/SELECT_SERVICE=1 - install the OpenVPN service
     21/SELECT_TAP=1 - install the TAP device driver
     22/SELECT_OPENVPNGUI=1 - install the default OpenVPN GUI
     23/SELECT_ASSOCIATIONS=1 - associate with .ovpn files
     24/SELECT_OPENSSL_UTILITIES=0 - install the utilities for generating public-private key pairs
     25/SELECT_EASYRSA=0 - install the RSA X509 certificate management scripts
     26/SELECT_PATH=1 - add openvpn.exe in PATH
     27/SELECT_OPENSSLDLLS=1 - dependencies - OpenSSL DLL's
     28/SELECT_LZODLLS=1 - dependencies - LZO compressor DLL's
     29/SELECT_PKCS11DLLS=1 - dependencies - PCKS#11 DLL's
     30}}}
     31These parameters are useful and necessary when performing an unattended or programatic installation.
     32Unfortunately with the release of 2.5 and the moving to an MSI installer these parameters no longer work and at the time of this writing the OpenVPN Project has not documented new parameters.
     33Luckilyfor us MSI files have some basic characteristics and behaviors.
     34
     35You can run any MSI file with logging like this:
     36{{{
     37msiexec /i installer.msi /l*v log.txt
     38}}}
     39It will pop up your installation GUI and you can then pick the customize option and choose the combination of features that you need.
     40Once complete you can open your log file that you signified and search for ADDLOCAL.
     41In our case where we desire to install only the OpenVPN Service and the new Wintun Drivers we find this:
     42{{{
     43ADDLOCAL=OpenVPN.Service,OpenVPN,Drivers,Drivers.Wintun
     44}}}
     45We can now run the installer on subsequent windows servers with the following command:
     46{{{
     47msiexec /i OpenVPN-2.5.0-I601-amd64.msi ADDLOCAL=OpenVPN.Service,OpenVPN,Drivers,Drivers.Wintun /passive
     48}}}
     49If we wanted to change the installation directory we could do so like this:
     50{{{
     51msiexec /i OpenVPN-2.5.0-I601-amd64.msi PRODUCTDIR="C:\Program Files\OpenVPN25\" ADDLOCAL=OpenVPN.Service,OpenVPN,Drivers,Drivers.Wintun /passive
     52}}}
     53If you are looking to install the GUI and the older Windows TAP adapter you would do so like this:
     54{{{
     55msiexec /i OpenVPN-2.5.0-I601-amd64.msi ADDLOCAL=OpenVPN.GUI,OpenVPN,OpenVPN.GUI.OnLogon,Drivers.TAPWindows6,Drivers /passive
     56}}}
     57So there you have it. An easy work around to perform silent windows installations.
     58Hopefully this will save some time and effort for people looking to utilize the new OpenVPN 2.5 client in their DevOps environments.
     59
     60
     61