The VMware View Client delivers useful information to the VMware View Agent which can be found in the virtual desktops Windows registry. This information can be used by scripts i.e. for mapping the right network printer based on the location of the View Client device.
The information is stored as environment variables within the registry key: HKEY_CURRENT_USER\Volatile Environment.
This list shows which variables are available:
ViewClient_Broker_DNS_Name (FDQN of the broker)
ViewClient_IP_Address (IP address of the connecting device)
ViewClient_MAC_Address (Client MAC address)
ViewClient_Machine_Name (Client hostname)
You can read this information very easily from the registry using a VB-script:
Based on the client’s hostname, IP-address or MAC address it would be possible to map a special printer or network drive during logon or reconnect. Companies using hot desks for their employees or just people moving between different workplaces during the day can take advance of that. The script can grab the client name variable, then check it against a database and retrieve the correct network printer for that location. That’s it!