cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
24495
Views
0
Helpful
1
Replies

Commands to kill running AnyConnect 4.x?

webabc123
Level 1
Level 1

I created a script to silently upgrade AnyConnect client for Windows and it works fine as long as the client isn't running.

I would like to add a command  to the script to disconnect any running VPN session and force close AnyConnect so it doesn't interfere with the uninstallation of the existing version.  Maybe just killing the processes is enough and no separate VPN disconnection command is needed, but I don't know what I processes I need to kill to allow for smooth removal.

What commands will do what I need?

1 Accepted Solution

Accepted Solutions

JP Miranda Z
Cisco Employee
Cisco Employee

Hi webabc123,

You can run the following VBS script:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "taskkill /F /IM vpnagent.exe /IM vpnui.exe"

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

vpnagent.exe= session service

vpnui.exe= graphic interfaces service

Hope this info helps!!

Rate if helps you!! 

-JP-

View solution in original post

1 Reply 1

JP Miranda Z
Cisco Employee
Cisco Employee

Hi webabc123,

You can run the following VBS script:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "taskkill /F /IM vpnagent.exe /IM vpnui.exe"

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

vpnagent.exe= session service

vpnui.exe= graphic interfaces service

Hope this info helps!!

Rate if helps you!! 

-JP-

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: