Integration

4 Add the path to the start session script to the registry.
a In the navigation area, right-click ScriptEvents, select New > Key, and create a key named
StartSession.
b In the navigation area, right-click StartSession, select New > String Value, and create a string
value that identifies the start session script to run, for example, SampleScript.
To run more than one start session script, create a string value entry for each script under the
StartSession key. You cannot specify the order in which these scripts run. If the scripts must
run in a particular order, invoke them from a single control script.
c In the topic area, right-click the entry for the new string value and select Modify.
d In the Value data text box, type the command line that invokes the start session script and click
OK.
Type the full path of the start session script and any files that it requires.
5 Add and enable a start session value in the registry.
a Navigate to HKLM\SOFTWARE\VMware, Inc.\VMware VDM\Agent\Configuration.
b (Optional) If the Configuration key does not exist, right-click Agent, select New > Key, and
create the key.
c In the navigation area, right-click Configuration, select New > DWORD (32 bit) Value, and
type RunScriptsOnStartSession.
d In the topic area, right-click the entry for the new DWORD value and select Modify.
e In the Value data text box, type 1 to enable start session scripting and click OK.
You can type 0 to disable this feature. The default value is 0.
f (Optional) To delay the StartSession response by Horizon Agent, add a second DWORD value to
the Configuration key called WaitScriptsOnStartSession.
A WaitScriptsOnStartSession data value of 1 causes Horizon Agent to delay sending a
StartSession response and fail if the scripts do not complete. A value of 0 means that
Horizon Agent does not wait for the scripts to complete or check script exit codes before sending
the StartSession response. The default value is 0.
6 Set a registry value to specify timeout values in seconds rather than minutes to prevent scripts from
timing out.
Setting this timeout value in seconds enables you to configure the VMware View Script Host service
timeout value in seconds. For example, if you set the VMware View Script Host service timeout to 30
seconds, you can ensure that a start session script either finishes running or times out before a View
Connection Server timeout occurs.
a Navigate to HKLM\SOFTWARE\VMware, Inc.\VMware VDM\ScriptEvents.
b Add a DWORD value called TimeoutsInMinutes.
c Set a data value of 0.
View Integration
VMware, Inc. 46