Subscribe RSS Feed | Follow on Twitter

Using Client Information in VMware View

with 2 comments

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_Broker_Remote_IP_Address
  • ViewClient_Broker_Tunnel_URL
  • ViewClient_Broker_Tunneled (True/False)
  • ViewClient_Broker_URL
  • ViewClient_IP_Address (IP address of the connecting device)
  • ViewClient_LoggedOn_Domainname (Domainname)
  • ViewClient_LoggedOn_Username (Username)
  • ViewClient_MAC_Address (Client MAC address)
  • ViewClient_Machine_Name (Client hostname)
  • ViewClient_Type (Linux/Windows)
  • You can read this information very easily from the registry using a VB-script:

    image

    Example:

    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!

     

    Scripting resources:

    http://msdn2.microsoft.com/library/d1wf56tt.aspx

    http://www.microsoft.com/technet/scriptcenter/tools/scripto2.mspx

    http://www.microsoft.com/technet/scriptcenter/tools/admatic.mspx

    http://www.microsoft.com/technet/scriptcenter/default.mspx

    http://www.microsoft.com/technet/scriptcenter/guide/default.mspx?mfr=true

    Similar Posts:

    Written by Christoph Harding

    May 29th, 2009 at 12:42 pm

    • Shawn

      I have a customer who has a (licensing) requirement to make MS Office unavailable to users if they access the desktop from the Internet.
      Since View makes desktops available on a user entitlement basis, you couldn’t just make two versions of a desktop and expect that the user will choose the one without Office when they are remote.
      My thought was to ThinApp Office but use the information you mention to script the thinreg registration of Office only if a variable was true.
      The variable would have to be true only if they access the desktops internally. Outside users would be going through the View Security server and internal users would be direct to the View Connection server, so I think this would be possible. What do you think?
      I am not an experienced coder, so if you felt really charitable, could you share code that could be used in a script?

    • http://www.thatsmyview.net Christoph Dommermuth

      When they come through another broker (sec server) you could query the environment variable for the broker in your ThinApp script. I would suggest to open a new post in the ThinApp forums to ask if someone already has written a script for that.