Wednesday, January 7, 2015

Cisco VPN Auto Connect

 

Happy New Year !

I was hoping the new year brings some change in my professional or personal life, and looks like things are changing. I have wrapped up another Siebel + BIP On Premise deployment and now moving onto the cloud. We were having some bad network related issues on the last project, the VPN would timeout sporadically. Then we would have to open it up and again enter the VPN credentials to get back in.

Here is a BAT file I wrote to automate the connection sequence. Save the following into a text file with .bat extension.

-----------------------------------------------------------------------

 

cd "C:\Program Files\Cisco Systems\VPN Client"

start vpngui.exe

vpnclient.exe connect <VPN Connection entry> user <userid> pwd <password>

 

-------------------------------------------------------------------------

 

Assumption is that Cisco VPN software is installed on your C: drive.

The executable vpnclient.exe is the actual software which makes the connection, but then, it does not put an icon in the taskbar. So when the connection terminates, it does not tell you so. That's why we open the vpngui.exe windows executable as well. This tool will show the connection status in your taskbar, so you will alert you when the VPN disconnects.

image

Hope it helps !