How to Use VB Scripts with Post-Connection Scripting
This article explains how to use a Visual Basic script (VBScript, or .vbs) with Connect Tunnel and OnDemand Tunnel post-connection scripting.
Configuration / Implementation Steps:
Typically, with batch scripts or executables, an administrator enters the full path and name for the script file that will be run after a connection has been established. With VBScripts, this isn't possible: you must use the Windows Script Host utility to call the .vbs script in order for the tunnel client to run it. Here are the steps to accomplish this:
In AMC, go to the user community for which you have enabled the tunnel client.
Click Access Methods and then click Configure.
Expand Windows options and then configure the fields with the examples given below:
Run this file: c:windowssystem32cscript.exe
Command line arguments: <Path to the script>. This path can be in either of these formats: drive:pathtoscript.vbs or \pathtoscript.vbs>.
Working directory: <leave emtpy>
Click OK and then save the settings for this community.