Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I configure the Cisco VPNUI client as a shortcut to open a specific host? As far as I can tell, the program doesn't take an command line arguments, or does it?

The problem is that the VPNUI.exe doesn't remember a history of VPNs you have connected to in the past, as most other software programs would do.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Yeah, looks like AnyConnect's GUI is completely ignorant of what's on the command line.

I can think of a couple options:

  1. Avoid the UI completely, and use vpncli.exe that's included by AnyConnect's installer
  2. Wrap a batch file around the vpnui.exe launch, swapping out the preferences.xml file with one containing the desired host. (on win7, my preferences.xml is in my profile at AppData\Roaming\Cisco\Cisco AnyConnect VPN Client)
share|improve this answer
    
I tried that suggestion. While the vpncli.exe works from the command line, I am unable to get it to load a profile.xml, preferences.xml, nor a AnyConnectProfile.xml from the C:\Program Files\Cisco\Cisco AnyConnect VPN Client\ directory . Anyone know how to do this? –  djangofan Jul 6 '11 at 23:28
    
To clarify, it was two separate suggestions; the UI client is the only thing that's gonna pay attention to preferences.xml, while the CLI client's configuration is all dictated by the command line (so, if you want, you can write a bunch of batch files running vpncli.exe connect host.domain.com). –  Shane Madden Jul 7 '11 at 0:54
    
Yep, that works. Thanks. There was no need to edit any .xml file as far as I can tell. Just "vpncli.exe connect hostname" . –  djangofan Jul 11 '12 at 18:23
    
I know this is an old post, I just wanted to say thank you djangofan and Shane for the question/answer. I was hoping it supported some command line arguments, but I ended up doing option #2 and making a .BAT file to handle my preferences.xml. I'm going to look into the vpncli.exe option when I get some time. –  Adam Plocher Apr 9 '13 at 21:10

I'm having a similar issue however I was able to get multiple profiles by adding a second profile.xml to C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile ... The ProgramData folder is/was hidden. I originally had a AnyConnectVPN.xml file there, which I duplicated and renamed profile.xml with the information for my other connection. However when I run VPNCLI.exe connect ... It still prompts for username and password which isn't very helpful...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.