0

I'd like kind of a shortcut (maybe command line options?) or config that makes OpenVPN Connect connect when I start it, so I don't have to open it and wait till it starts up and then click the toggle, but I only have to click a shortcut for example and it connects automatically.

Automatic connection at startup is unnecessary since I don't always need VPN. (All other posts I found are about this problem above, not mine.)

I use the Windows OpenVPN Connect client.

4
  • 1
    1. There are versions of OpenVPN for many operating systems, and the answer would be different for each. 2. Have you considered a batch file that would first start VPN, then app? Commented May 9 at 16:34
  • @DrMoishePippik 1. I hoped there was a general solution (some kind of /hidden/ setting) that would help not just me but others too. But I clarified the question. 2. Maybe I wasn't clear. Edited the title as well. I meant the OpenVPN Connect client when I wrote 'application'. So I want it not to just start but also connect to VPN afterward. I don't want to start any other application with this shortcut.
    – tkalvin
    Commented May 10 at 9:02
  • See superuser.com/questions/1166026/… Commented May 10 at 16:16
  • @DrMoishePippik (I've also found that previously while my search, now I re-checked it.) It suggested openvpn.exe --connect profile.ovpn which is not working. I've also found (finally) the OpenVPN help page, which doesn't even mention this CL argument, nor anything else that would do what I want.
    – tkalvin
    Commented May 13 at 10:00

1 Answer 1

0

After some struggle, I accidentally found the solution in the GUI.

If you press edit on an imported profile and scroll down you can find a button 'Set connect shortcut' (see image below). It creates a shortcut on the desktop that has a target attribute with the path of the executable, and a command line argument:

--connect-shortcut=<profile_id>  

where profile_id is the id of the profile that you can find above this button. For me it was the file name without the .ovpn file extension by default.
For some reason, this option is not listed on the documentation page.

OpenVPN Connect > Edit Proile

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .