Setup / Windows / Auto-connect

Unfortunately, OpenVPN doesn't have built-in autoconnect methods.

To configure autoconnect, one has to setup a task in Windows task manager, which would be executed on windows logon.



First, open "Start" menu and start printing "scheduler" (for win7+), or go to Start - Control panel - Administration - Scheduler

In right part of scheduler window, select 'Create basic task' item:






In master, set name of new task, something like "OpenVPN Autostart", and press "Next"





In next window, select "On windows logon", and press Next again





Don't change anything in next window, just press Next





Now you need to set program, which should be executed.

Press "Browse" button and find "openvpn-gui.exe" executable. Usually it is located in C:\Program Files\OpenVPN\Bin


in "Arguments" field enter string --connect "PROFILE.ovpn", where PROFILE.ovpn - is your VPN profile name, something like TGVPN_fra.ovpn

Like this:






After pressing Next, in next window set checkbox "Open properties for task: and press Finish:











Then go to triggers and check the only string: