Command-line installation of OpenVPN

OpenVPN’s installer allows for command-line based (silent) installation, but this feature is not actually documented explicitly anywhere. Here’s all I could find – hope this list will help someone in the same situation I was in.

The installer allows you to specify is the installation should be “silent” (i.e. no GUI, nothing to click on), to specify custom installation directory (esp. useful if included in another installer, e.g. NSIS, and installing in the same directory as the target app), and components to install.

The parameters can be used even when you’re not using the silent installation, to customize behavior of the graphical installer.

/S      - silent installation
/D=path - specify a custom installation path
Note – the /D parameter has to appear last on the command line, and the path may not be inclosed in quotes. The installer simply takes all of the command line left, and uses it as path (thus supporting spaces in the path).

To select individual OpenVPN components (1 = install, 0 = do not install; the values below indicate defaults):

/SELECT_SHORTCUTS=1              - create the start menu shortcuts
/SELECT_OPENVPN=1                - OpenVPN itself
/SELECT_SERVICE=1                - install the OpenVPN service
/SELECT_TAP=1                    - install the TAP device driver
/SELECT_OPENVPNGUI=1             - install the default OpenVPN GUI
/SELECT_ASSOCIATIONS=1           - associate with .ovpn files
/SELECT_OPENSSL_UTILITIES=0      - install the utilities for generating public-private key pairs
/SELECT_EASYRSA=0                - install the RSA X509 certificate management scripts
/SELECT_PATH=1                   - add openvpn.exe in PATH
/SELECT_OPENSSLDLLS=1            - dependencies - OpenSSL DLL's
/SELECT_LZODLLS=1                - dependencies - LZO compressor DLL's
/SELECT_PKCS11DLLS=1             - dependencies - PCKS#11 DLL's

If you want to change the option on Services to OpenVPN service start automatically from command line, just use:
sc config OpenVPNService start= auto
Note the need for the space after =
To start it imediately:
net start OpenVPNService

Comments

Popular posts from this blog

Alternatives to: "The quick brown fox jumps over the lazy dog."

Using keys like ALT+TAB in UltraVNC.