Using BgInfo with VMware View

BgInfo is a free tool from Microsoft that automatically generates desktop backgrounds that include important information about the system like its IP addresses, host name, boot time, and so on.

This article explains how I am using BgInfo in a virtual desktop environment (VDI) and how it helps our hospital’s help desk support end users. We use VMware View 4.5 and BgInfo v4.16. These same concepts should work with other VDI solutions like Citrix XenDesktop. At the bottom of this article I’ve provided a BGInfo Template you may download that contains all of the VMware View registry variables, much the same way Citrix provides a BgInfo template for its Citrix XenDesktop customers.

Desired Result

The primary purposes of using BgInfo in a VMware View VDI desktop pool is to provide the end user an easy way to:

  • Identify who is logged in
  • Be able to provide IT Support their virtual IP address for Windows Remote Assistance connections
  • Be able to provide IT Support their physical WYSE IP address for VNC Shadowing connections
  • Warn users of linked-clone desktop pools that their session will automatically refresh after a period of inactivity

Secondary purposes of using BgIfno in a VMware View VDI desktop pool is to:

  • Capture user/desktop variables in a separate database (Microsoft Access or Microsoft SQL)
  • Easily deploy different desktop backgrounds to different desktop pools to easily distinguish pool and class of user (e.g. Help desk: “What color is your desktop?” User: “Blue”. Help desk quickly knows the user is using a non-persistent desktop pool, because the green desktops are persistent and are user assigned.)

In this example, a user’s desktop shows who is logged in (large text) and some vital information about their virtual and physical desktops.

BGinfo Desired Result

VMware View Client Variables

The VMware View Client captures information from both the physical desktop (a thin client or traditional PC) and virtual desktop and stores that information in the virtual desktop’s registry. You’ll find the Name and Data pairs here: HKEY_CURRENT_USER\Volatile Environment. Here are all of the available variables offered by VMware View 4.5:

BGInfo All Client System Information

HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_DNS_Name
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_Remote_IP_Address
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_Tunnel_URL
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_Tunneled
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Broker_URL
HKEY_CURRENT_USER\Volatile Environment\ViewClient_IP_Address
HKEY_CURRENT_USER\Volatile Environment\ViewClient_LoggedOn_Domainname
HKEY_CURRENT_USER\Volatile Environment\ViewClient_LoggedOn_Domainname
HKEY_CURRENT_USER\Volatile Environment\ViewClient_LoggedOn_Username
HKEY_CURRENT_USER\Volatile Environment\ViewClient_MAC_Address
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Machine_Domain
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Machine_Name
HKEY_CURRENT_USER\Volatile Environment\ViewClient_TZID
HKEY_CURRENT_USER\Volatile Environment\ViewClient_TimeOffset_GMT
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Type
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Windows_Timezone

In addtion to the helpful variables BgInfo includes by default, you are able to add Custom environment variables. I did so by clicking on Custom. Within Define New Field, I selected Registry Value and pasted in the path for each of the registry values provided by VMware View. The BgInfo template that I created contains all of these variables for you and may be downloaded at the end of this article.

BGinfo Define New Field

When done, you’ll end up with a library of newly created User Defined Fields. Naturally, you may add more fields from many different sources if you like, but that’s beyond the scope of this article:

BGinfo User Defined Fields

Configure BgInfo Background

To provide a uniform and consistent background for all images in your desktop pool, select Use these settings and then proceed to select your colors. You may optionally use a .BMP image, but solid background are a best practice to conserve resources.

BGinfo Background

Configure BgInfo Position

Next, determine where you would like this information aligned. I prefer the top-right corner because the large user name appears directly below the VMware View shade. If a second user walks up to a PC that has an open VMware View session (a no no, but it happens), the second user would close that session by clicking on the X right above the first user’s username.

BGinfo Set Position

Configure BgInfo Desktops

These settings define how BgInfo will update the wallpaper on each desktop.

BGinfo Desktops

Configure BgInfo Output Bitmap

These settings are important from a read/write and permission standpoint. I’ve had the best results and fewest errors by selecting “User’s temporary files directory.” You could optionally write all of the desktop .BMP files to a shared network resource if you wish to retain and backup these images. But I think the Database option is a better and more useful choice.

BGinfo Output bitmap

Configure BgInfo Database

One neat thing about BgInfo is that you may optionally capture and record all of the Fields (not just the information you choose to display on a user’s desktop) to a third-party database (either Microsoft Access or Microsoft SQL). This feature can provide you a helpful log of all user activity and the settings pertaining to each session at a given point in time.

BGinfo Database Settings

Create a Logon Script

I created a .CMD batch file that remotely launches BgInfo and the custom .BGI configuration template I created. I’ve added some variables to make the process silent and transparent to the user. Place this file in your NETLOGON folder.

REM Script written by Jason Pearce 2011 Jan
REM Purpose is to run BGinfo from a network resource for VDI clients
REM A Group Policy will be used to apply this script to specific users and computers

@echo off
%logonserver%\netlogon\bginfo\bginfo.exe %logonserver%\netlogon\bginfo\CustomBginfoVDIdefault.bgi /Timer:0 /NoLicPrompt /silent

Create a Group Policy

I then created a Group Policy that I assign to the Active Directory OU for each VMware View desktop pool. This makes it easy for me to have a variety of BgInfo settings and apply them to specific pools.

BGinfo Group Policy

Download BgInfo Template for VMware View

That’s it. If you have any other creative ways that you use BgInfo in your VDI environment, I’d love to hear about them below in my comments. Here is the BgInfo Template that I’ve already created for you that contains all of the user Defined Fields I mentioned above.

Enjoy.

Note (2012 Jan 23)

I expanded on this article by writing “Updating BgInfo when VMware View desktop changes locations.”

One reply on “Using BgInfo with VMware View”

  1. Link to BgInfo Template for VMware View NG – very interesting concept. Wanted to take a look at the template. Pretty neat solution!

    Looking for a way to use the viewclient_machine_name variable with group policies to map (shared) physical CD/DVD drive with Virtual machine.

Comments are closed.