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

OnConnect.vbs script for VPN drive mapping not working

Kasim
Level 1
Level 1

Hi all,

I've been struggling with this for hours and I can't seem to figure out what the problem is. 

The objective is to map network drives using the sbl script once a VPN connection is established on a client computer. Using anyconnect version 4.10. I have modified the profile XML and I have an OnConnect.vbs script file that works perfectly fine outside of VPN. The issue is once a VPN connection is established, the script file is not executed or called at all. There is no entries in event viewer or the anyconnect logs. 

I tried putting in <scriptname> in the profile XML and using just the name of the VBS file as well as putting the full path of the VBS file but nothing seems to work. When I tried to open the XML file using cisco profile editor with that tag in it, it wouldn't open and threw an error about the script name tag. 

I'm not deploying this from an ASA or FMC. It's to be locally executed on the client machine. 

The script is located in the cisco anyconnect profile folder in programdata.

Does anybody have any advice?

1 Reply 1

ccieexpert
Spotlight
Spotlight

where did you put the script ? what is the script full name ?

are you pushing the profile from the vpn headend ? it is requried to push a headend with scripting enabled from the headend.. what is the headend ? asa or ftd ?

<EnableScripting UserControllable="false">true
<TerminateScriptOnNextEvent>false</TerminateScriptOnNextEvent>
<EnablePostSBLOnConnectScript>true</EnablePostSBLOnConnectScript>
</EnableScripting>

dont have put script name in xml .. that is derived based on the prefix..

Please follow this:

https://www.cisco.com/c/en/us/td/docs/security/vpn_client/anyconnect/anyconnect40/administration/guide/b_AnyConnect_Administrator_Guide_4-0/customize-localize-anyconnect.html#ID-1408-000003c2

can you also capture a dart bundle. or atleast the anyconnect log file from the bundle and also your profile as well