How to auto connect without typing the User/Pass? Connect on startup?
Posted by Max Biggavelli on 23 October 2011 14:04
1. On your Desktop create a new text file, and name it "myauth.txt" or something similar. Then enter your username and password on one line each, like so:
Once finished, move your myauth.txt file, into the OpenVPN "config" directory. (Usually "C:\Program Files\OpenVPN\config" and C:\Program Files (x86)\OpenVPN\config on 64bit)
4. Go to the bin directory for OpenVPN (OpenVPN\bin) and make a shortcut for the OpenVPN-GUI exe. (The shortcut may be placed on the Desktop, this doesn't matter, we're going to move it anyway).
Right click the shortcut and choose properties. In the "Target:" box, it should read something like:
"C:\Program Files (x86)\OpenVPN\bin\openvpn-gui-1.0.3.exe" (with quotes).
Add onto the end (outside of the quotes) --connect username.ovpn where username is your username. Now it should look like:
"C:\Program Files (x86)\OpenVPN\bin\openvpn-gui-1.0.3.exe" --connect username.ovpn
Move this shortcut to the Startup folder, which is located in All Programs. If you can't find it, go to %appdata%\Microsoft\Windows\Start Menu\Programs\Startup.