Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

I love to automate and my VPN was no different. Once it was working I set out to automate it. To disable GUI *After you made sure it works right?* Configure Windows Client

Edit the following OpenVPN-NOGUI registry key.

[HKEY_LOCAL_MACHINE\SOFTWARE\OpenVPN-GUI]
"silent_connection"="1"

To make the VPN-Connect.CMD use something like this: (Changing "FreeSoftwareServers.ovpn" -- requires a seperate CMD for each VPN config)

@ ECHO OFF

cd C:\Program Files\OpenVPN\config && openvpn-gui.exe --connect FreeSoftwareServers.ovpn


To Create VPN-Kill.cmd use this: (Works for any connected OpenVPN)

 

@ ECHO OFF

taskkill.exe /F /IM openvpn-gui.exe && taskkill.exe /F /IM openvpn.exe

And definitely read up on Silent CMDs.

  • No labels