5.0

Table Of Contents
Running Commands on View Desktops
You can use the View Agent CommandsToRunOnConnect and CommandsToRunOnReconnect group policy settings to
run commands and command scripts on View desktops when users connect and reconnect.
To run a command or a command script, add the command name or the file path of the script to the group
policy setting's list of commands. For example:
date
C:\Scripts\myscript.cmd
To run scripts that require console access, prepend the -C or -c option followed by a space. For example:
-c C:\Scripts\Cli_clip.cmd
-C e:\procexp.exe
Supported file types include .CMD, .BAT, and .EXE. .VBS files will not run unless they are parsed with
cscript.exe or wscript.exe. For example:
-C C:\WINDOWS\system32\wscript.exe C:\Scripts\checking.vbs
The total length of the string, including the -C or -c option, should not exceed 260 characters.
Client System Information Sent to View Desktops
When a user connects or reconnects to a View desktop, the View client gathers information about the client
system and View Connection Server sends that information to the desktop. View Agent writes the client
computer information to the system registry path HKCU\Volatile Environment on the desktop.
You can add commands to the View Agent CommandsToRunOnConnect and CommandsToRunOnReconnect group
policy settings to run commands or command scripts that read this information from the system registry when
users connect and reconnect to desktops. See “Running Commands on View Desktops,” on page 145 for more
information.
Table 8-5 describes the registry keys that contain client system information and lists the types of client systems
that support them.
Table 8-5. Client System Information
Registry Key Description Client Systems Supported
ViewClient_IP_Address
The IP address of the client system. Windows
Linux
Mac
ViewClient_MAC_Address
The MAC address of the client system. Windows
Linux
Mac
ViewClient_Machine_Name
The machine name of the client system. Windows
Linux
Mac
ViewClient_Machine_Domain
The domain of the client system. Windows
Linux
Mac
ViewClient_LoggedOn_Username
The user name that was used to log in
to the client system.
Windows
Linux
Mac
Chapter 8 Configuring Policies
VMware, Inc. 145