I have setup on the SSL VPN ASA scripts_OnConnect.vbs that maps the users P drive when users login via AnyConnect. This works fine. I have a request to run a file once a user logs in via Cisco AnyConnect. It normally runs when a user is inside our network when they are logging in and goes to our auditserver1. I want to add this function to users logging in via VPN.
The windows command that runs when they are insaide the network is Start \\auditserver01\audit\scanner\AuditScanner.exe
I want to know how to write this to my scripts_OnConnect.vbs. I am not VBS scripting literate and would appreciate any help.
This is my current sciprts_onConnect.vbs that map the P drive to users accounts
'ON ERROR RESUME NEXT
'Err.Clear
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set objShell = CreateObject("WScript.Shell")
objShell.LogEvent 0, "Sample AnyConnect OnConnect script."
Dim strDriveLetter, strRemotePath
strUName = WShNetwork.UserName
strDriveLetter = "P:"
strRemotePath = "\\server01\" & strUName
' add new mapping
wshNetwork.MapNetworkDrive strDriveLetter, strRemotePath
If Err.Number <> 0 Then
objShell.LogEvent 0, "Failed to map network drive." & vbCrLf & Err.Number & ": " & Err.Description
End If
WScript.Quit