Today we are going to be editing and using AutoConnect/Auto Disconnect Scripts for Liquid Viscosity as well as making everything happen at start up. The two scripts are used to start a program on connection and the kill said program on disconnect from VPN server.  These scripts are available in the download area. 

Close Program on VPN Disconnect Script

Open Program on VPN Connect Script


 1.   The first thing we are going to do is copy over the Vpn-connect.vbs, and the vpn-disconnect.vbs over to your LiquidVPN/config Folder.  I like to keep related files organized and you should too!!
Moving files to LiquidVPN/config folder



 2.  After we do that we are going to Right Click VPN-Connect and go to "Open With" Choose Notepad (My .vbs has already been opened up with notepad before so its a little different).
Open With Notepad


 
 3.   Now we are going to Edit the C:\Program Files**************************** to the path of the .exe you want to boot after connection to desired VPN is established.  Go ahead and Save when your finished.
Editing the document



 4.   Next we are gonna do the same thing with the Disconnect Script so Right Click VPN-disconnect Open With Notepad!
VPN-Disconnect in notepad



 5.   5th line of CODE(NOT INCLUDING THE COMMENTS AT THE TOP) ( strProcessKill = "'EXAMPLE.exe'" ) .  Where Example is you want to put the exe you wish to terminate on disconnect from desired VPN.
Editing Disconnect Script in notepad



 6.   Now that we got the hard stuff out of the way, go ahead and Right Click Liquid Viscosity System Tray Icon and go to Preferences.
Right Click Liquid Viscosity System Tray Icon and go to Preferences



 7.   In the Connections Tab we want to click on whatever server you want to auto connect to and duplicate the connection by hitting the GEAR in the bottom right corner.
Duplicating Desired Connection



 8.   After duplicating, Right Click the new connection (usually created at bottom of list) and go to Edit.
Right click new connection and go to Edit



 9.   Click on the Advanced Tab
Advanced Tab



10.  Click Select next to Connected Script, the first one you will have to navigate to the directory.
Select Button next to Connected Drop Down BoxSelect File browser



11.  Click Select next to Disconnected Script.  You shouldnt have to navigate back to the VPN folder, just select VPN-disconnect.vbs this time instead of the VPN-connect.vbs.
Select button right of the drop down box for disconnect script



12.  Make sure to check the "Connect when Liquid Viscosity opens" option.  Click Save
Check "Connect when Liquid Viscosity opens" in the bottom left corner



13.  If you want to set everything to start up with computer then go to the General Tab in Preferences.
Start at login in General Tab of Preferences



 14.  To test it out just close Viscosity and ReOpen it.  It should auto connect to the edited server, then start designated .exe.

Also Read

Liquid Viscosity on OS X
Please note that Liquid Viscosity is outdated and is no longer the recommended way to connect to...
Generate new Liquid Viscosity License
When installing Liquid Viscosity if you get an error about your license file not being valid you...
Installing Viscosity on Windows 8.1
This guide is old and we no longer recommend using this client. Instead we recommend using the...
How to Import VPN Connections On Viscosity
In this guide we will be importing .ovpn or .visz connections into Liquid Viscosity on Windows....
How to send us your Liquid Viscosity logs
Every so often with any VPN service including LiquidVPN there may be issues that you are...