Cisco

Batch Files to start and stop Cisco VPN

Cisco AnyConnect requires two files. The batch file to click on and a txt file it will read to get the firewall address username and password. Create a txt file with the firewall address, username, and password. (format as below) save this file to the PC.

vpn.yourHost.com
user01

P@ssword

Open Notepad paste the start txt save as start.bat

Repeat for the stop batch file save as stop.bat

Cisco AnyConnect

64bit - Start

@echo off

“C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe” -s < “C:\Login.txt”

64bit - Stop

@echo off

“C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe” disconnect

32bit - Start

@echo off

“C:\Program Files\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe” -s < “C:\Login.txt”

64bit - Stop

@echo off

“C:\Program Files\Cisco\Cisco AnyConnect Secure Mobility Client\vpncli.exe” disconnect