In a previous article, I outlined the steps I took to “roll” my own customized OpenVPN installer, and it worked like a charm back then. OpenVPN has gone through several revisions since, and getting things running (especially on different architectures) with the new versions just doesn’t work so well. Luckily, there’s another way to approach this problem and have OpenVPN installed as it was intended (i.e. the correct TAP driver will be detected and the shortcuts where they belong). This method is more of a workaround, but definitely works. Note that with this method you can’t rename OpenVPN to “MyVPN” or whatever like the previous method.
This method employs the use of an SFX that installs the vanilla OpenVPN installer as downloaded from their site, then automatically installs the keys afterwards. You have the option of making the install entirely silent as well–it’s all up to you.
7-ZIP SFX Maker (version 2.0 at the time of writing)
OpenVPN (version 2.1_rc19 at the time of writing)
Your OpenVPN keys
First, package your OpenVPN keys with 7-Zip. If you want multiple OpenVPN connections configured on the same machine, it’s a good idea to have each connection’s keys in a subfolder. Ensure that each connection has a .ovpn or .conf file with a unique name.
Next, open up 7-ZIP SFX Maker and add your archived keys by clicking on the “+” symbol. Now, go to the “General” tab. Under “Extract to specified folder”, enter %ProgramFiles%\\OpenVPN\\config. You can right-click for some preset environment variables if you want to change the path.
You can change other options if you’d like. I have “Beginning extraction of keys…” in the “Begin prompt” field of the Text tab. From here, you’re ready to click “Make SFX”.
Now, create another 7-Zip archive with your new SFX and the OpenVPN installer. Add this archive to 7-ZIP SFX Maker. In “General” enter %tmp% or another writable directory in the “Extract to specified folder” field. I have “Allow user to change extraction path” checked as well–this all depends on your environment and needs. Under the Text tab, I have it filled as follows:
Under the Shortcuts tab, I created a shortcut to OpenVPN GUI in Startup so that it starts on login.
Now, (and this is important), go to the Execute tab. We will tell the SFX maker to run the OpenVPN installer then run the SFX for the keys. Be sure to list them in that order. Note that I have a /S in the first entry because I want OpenVPN to install silently. Sadly, not everyone at my company knows how to install software, and I’m satisfied with the setup defaults anyway.
You’re now ready to “Make SFX”! Your new installer will be placed in the folder your files were in.
You might want to play around with settings until the installer suits your tastes.