Contents

Creating your own installer and install configuration from ZIP file

This procedure will create an OpenVPN installer wrapper which will let you download the OpenVPN installation files on-the-fly, validate them by a simple MD5 and install a pre-configured configuration ZIP file in the proper place automatically.

To use this setup, it's expected that you:

Have access to a Web server where your users can download your files from the Internet

Prepares a ZIP file with a OpenVPN configuration file together with all other needed files for a proper configuration

The intention is that the user will download this OpenVPN installation wrapper and run only that. This wrapper takes care of the rest.

The advantage of this is that this installation wrapper do not need to be updated often. When OpenVPN releases a new, you just need to update your web server with the new OpenVPN installer and generate a new OpenVPN installer MD5 hash file.

Find (and install) a suitable program for generating MD5 hashes of files

Unzip the NSIS plug-ins and place them in a plugins/ directory where the OpenVPN-InstCfgWiz.nsi file is located. Only three DLL files needs to be located here:

inetc.dll

md5dll.dll

nsUnzip.dll

Build the installer

Open the OpenVPN-InstCfgWiz.nsi file in a text editor

Locate the "Download URLs ... **MUST BE CHANGED**" section

Change these three URLs to proper addresses where you will make the OpenVPN installer available. The variables you need to change are:

$URL_InstCfgWizHash - This file will be generated at the end. It will contain a MD5 hash of your install wrapper which you are preparing now

$URL_OpenVPNinstaller - A complete URL to the OpenVPN installer itself. If you don't want to rebuild this install wrapper when a new OpenVPN version becomes available, avoid using any version number strings and use a neutral name for the installer.

$URL_OpenVPNinstallerHash - A file which contains the MD5 hash of the OpenVPN installer executable

Or, if using PKCS#12 files instead - the .p12 file containing all of the above.

These files should be in the "root" of the zip file - meaning: Do not use subdirectories in the ZIP file. This file will be extracted in the OpenVPN/config directory which OpenVPN-GUI reads.

Distribution

Send the prepared ZIP file together with either the OpenVPN-InstCfgWiz.exe file or a download URL to this file. Ask the user to run this installer and follow the instructions given on the way.

That's all folks!

Disclaimer

I (David Sommerseth) am by no means familiar neither with Windows nor the NSIS installer. The NSIS script is hacked together in a style that it should work. But I do not guarantee it is free of bugs or is written in the most efficient way. For compiling the installer, I have used Fedora 11 and Fedora 12 with the ming32-nsis package. The installation is tested during the development by using wine. Feel free to send your updates to dazo@users.sourceforge.net, and I will incorporate your changes.