AnyConnect Script problems

Unanswered Question
Mar 3rd, 2010
User Badges:

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.



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
BrianScott01 Thu, 03/04/2010 - 07:01
User Badges:

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?

David Cebula Thu, 03/04/2010 - 09:40
User Badges:

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

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.

BrianScott01 Thu, 03/04/2010 - 12:33
User Badges:

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.

David Cebula Thu, 03/04/2010 - 13:18
User Badges:

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.

BrianScott01 Mon, 03/08/2010 - 14:18
User Badges:

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

antonyurchenko Wed, 06/16/2010 - 16:54
User Badges:

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?



This Discussion

Related Content