Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

AnyConnect Script problems

AnyConnect 2.4 client on Windows.  Can't get the OnConnect scripting to work Note1) client profile XML has 'enablescripting'=true and downloads to the client from the ASA just fine. Note2) The OnConnect script (OnConnect.cmd) is a simple drive mapping for the XP client.  It runs fine when run locally on the XP system.

Problems: a) As a test, I've put the local OnConnect.cmd file is in the 'All Users'\Application Data\Cisco\Cisco ANyConnect VPN Client\Scripts directory as stated in the docs - I have a Script directory too as I was unsure which name was correct.  When starting the AnyConnect 2.4 client, all looks good, but the script does not execute.  b) When I can get the local OnConnect to work, then I need to know where on the ASA to place the OnConnect script - ASDM Configuration/Remote Access VPN, Network (Client) Access/AnyConnect Customization/Binary? not sure.

Thanks

--dano

Everyone's tags (3)
6 REPLIES
Community Member

Re: AnyConnect Script problems

I am researching the exact same thing.  Currently it's looking like the script needs to be in the .pkg file.  Does anyone know where there is a more detailed step by step on how to get the script automatically deployed to the clients?  If it has to be in the .pkg file, how do I extract that and how do I repackage it after I modify it?

Community Member

Re: AnyConnect Script problems

Carefully check the script naming.See Chapter 3 of the AnyConnect Admin Guide

http://www.cisco.com/en/US/partner/docs/security/vpn_client/anyconnect/anyconnect24/administration/guide/anyconnectadmin24.html

I have a .vbs script for Windows clients that I push down to the clients using the ASA. I imported it to the ASA under AnyConnect Customization/Scripts.

On my local machine I named the script "scripts_OnConnect.vbs". When I imported it the ASA I gave it that same name when prompted. When it gets downloaded to the client. It will have the name OnConnect.vbs as per the documentation.  I found that if I left the ".vbs" off the ASA name when I imported it, it got left off when downloaded to the client and so it would get executed.

You just need to give a name of "scripts_OnConnect.cmd" for it to work.

Community Member

Re: AnyConnect Script problems

I did find the other section about customizations, which made the scripting documentation a lot clearer.  It's still not downloading though.  I have even added a company_logo.bmp under customization/Resources which is also not downloading to anyconnect.

When you say imported to anyconnect customization/scripts, do you mean you uploaded the file as script_OnConnect.vbs to Anyconnect Customization/Binary?  I am guessing that's just a typo, but I want to make sure that it's not a missing section from my ASDM.

Since the logo will not download either, there is still some key element I am missing.  I'll keep working on it.

If any cisco documenters read this, on Step 2 of "Writing, Testing, and Deploying Scripts", please make it a bit clearer to first read the section about customizing the clients.  Some of us are in a time crunch and skip ahead to just the part we need, and that step only makes since if you already read the customization section.

Community Member

Re: AnyConnect Script problems

Uploaded the file with name "scripts_OnConnect.vbs" and I imported it under the AnyConnect Customization/Scripts. Once it was uploaded it shows up under both /Scripts and /Binary. This was with the ASA 8.2.(2), ASDM 6.2(5), AnyConnect 2.4.1012

There is an "Autoupdate" preference for AnyConnect now, any chance your clients are set not to update? Mine seems to check everytime.

Community Member

Re: AnyConnect Script problems

Ah, thanks for including your versions.  That seems to have been it.

Community Member

Re: AnyConnect Script problems

I am running ASA 8.2(2) ASDM 6.3.1 and Anyconnect Client 2.5.0217, and also running into issues where the script is pushed to the client but is not executed.

EnableScripting=true is set in the profile.

I have named my script OnConnect.vbs and I see it getting pushed to the client but not executed.

Could it be the versions of  ASDM and AnyConnect, that are the issue?

Thanks!

8298
Views
0
Helpful
6
Replies
CreatePlease to create content