Download Vpncli.exe

0 views
Skip to first unread message

Brynn Cropp

unread,
Jan 17, 2024, 8:51:30 PM1/17/24
to prasoplaira

I'd like to feed inputs to a command line interface for Cisco AnyConnect vpncli.exe (v2.3) to automate its (re)connection. It does not take username nor password as command line arguments, but reads those interactively from the user via the command line interface.

The vpncli.exe application uses ReadConsoleInput in order to read the password, that's way redirecting the password does not work. You can, though, use WriteConsoleInput. I have a small Python script that does exactly that:

download vpncli.exe


DOWNLOADhttps://t.co/r2XRkkD19D



This can be achieved by scheduling jobs through batch files to invoke the AnyConnect executable vpncli.exe. Getting familiarized with vpncli.exe on what parameters it takes will be helpful. Just invoke it via cmd prompt passing the help argument.

For the connection attempt, necessary information (i.e., tunnel group, credentials etc.,) required should be present in a text file and passed as an input to vpncli.exe. This SO post should be helpful.

The Cisco AnyConnect add-on use sendkeys to send information to the vpncli.exe window. The issue that we encounter is caused by the Windows UAC feature. Enabling/Disabling UAC on your computer should resolve the issue.

dca57bae1f
Reply all
Reply to author
Forward
0 new messages