Posts Tagged ‘utorrent’

Monitoring VPN connection

Sunday, November 28th, 2010

Sometimes you really need to make sure VPN connection is alive when you are running some applications. I didn’t find any easy way to do this in Win7 (I don’t want to installing new firewalls just because of this) so I made this small application called “vpncheck 1.1″:

http://code.vn720.com/files/2011/07/vpncheck-2011-06-07.zip

Old “vpncheck 1.0″ is still available at http://code.vn720.com/files/2010/11/vpncheck-2010-27-11.zip

It does following:

Checks every 0.3s that VPN connection is active and kills listed processes if not.
If later VPN becomes active, the processes are re-started.

Reads config file (vpncheck.cfg) which has following format:
<name of VPN connection, e.g. Anonine>
<full absolute path filename of exe 1>
<full absolute path filename of exe 2>

Example of valid config file:
Anonine
C:\Program Files (x86)\uTorrent\uTorrent.exe
C:\Program Files (x86)\Skype\Phone\Skype.exe

Tested on Windows 7.

Provided as is, no guarantees of any kind.
This is a bit hacky application so don’t take it as example of good software engineering, but it should work.

Feedback, bugs, comments, welcome: jani@kajala.com

The application comes with full source code and build files (Visual Studio 2008) if you are interested to take a look. However, it does have executable as well.

Cheers,

Jani