In my previous article “Using BgInfo with VMware View,” I discuss how to use Microsoft’s BgInfo utility within a VMware View desktop pool to write the following information to a user’s wallpaper:
- Username
- Physical and Virtual PC name
- Physical and Virtual IP address
- Physical and Virtual MAC address
Example of BgInfo wallpaper for my VMware View environment

Problem
My BgInfo solution is great. It helps users know they are accessing their own virtual desktop (nurses and doctors frequently move from one PC to the next) and helps the Help Desk identify who is working where (by computer name, IP, or MAC address).
The primary problem is that my initial solution ran BgInfo only at logon. When nurses and doctors switch from one physical client to another (typically stationary thin or zero clients), BgInfo’s values are not updated and were now displaying stale IP/MAC values for the physical client.
The secondary problem was that monitor resolutions vary, sometimes forcing the BgInfo content out of view.
Solution
The solution was to leverage Group Policy Preferences, Scheduled Tasks, and Event Logs. I wanted to use these three tools to trigger BgInfo to run whenever a user moved their VMware View virtual desktop from one location to another. Here’s how I did it.
Open your Group Policy Management Editor, create a new Group Policy, and click Edit. Navigate to User Configuration > Preferences > Control Panel Settings > Scheduled Tasks. Right-click > New > Scheduled Task for Windows Vista or greater.

General Tab
Give it a useful name and then stick with the defaults.

Trigger: At Logon
Create a new Trigger to run GpUpdate 30 seconds after logon. When using the PCoIP protocol, I’ve found that some zero and thin clients resize shortly after logging the user into their desktop. Having BgInfo run 30 seconds after login makes sure it appears in the right spot.


Trigger: On an Event, after Group Policy update
This was my first solution. If I could get BgInfo to randomly run several times a day, I’d have more accurate information. Since Group Policy updates occur about every 90 minutes, I configured this Scheduled Task to run after EventID 5315 (Log: Microsoft-Windows-GroupPolicy/Operational; Source: Microsoft-Windows-GroupPolicy) appeared in the virtual machine’s Event Logs. Additionally, the Help Desk could ask a user to run “gpupdate” to refresh BgInfo at will.

Trigger: On an Event, after Terminal Services logon
This proved to be the better solution. When a user logs into their VMware View desktop from another location, EventID 25 (Log: Microsoft-Windows-TerminalServices-LocalSessionManager/Operational; Source: Microsoft-Windows-TerminalServices-LocalSessionManager) appears in the virtual machine’s Event Logs. If I could get BgInfo to run every time this event occurred in the logs, then the BgInfo would remain accurate as the user moves from one location to another.

Actions Tab
Create a new Action that silently runs BgInfo from a network share. I use a VB Script that silently launches a BAT file.


VB Script
Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c \%LOGONSERVER%\netlogon\Bginfo-nonpersistent.bat"
oShell.Run strArgs, 0, false
BAT file
@echo off
%logonserver%\netlogon\bginfo.exe %logonserver%\netlogon\Bginfo-nonpersistent.bgi /Timer:0 /NoLicPrompt /silent
Conditions, Settings, and Common tabs
I’m not using these tabs.
Closing
By using Group Policy Preferences to create a Scheduled Task that monitors specific Event Logs, we’re able to have BgInfo run and update a user’s VMware View desktop wallpaper each time they move from one location to another.