Snazzy OSD status with BGInfo

This Blog post was created by Michael Schmidt.

Controlling the look and feel throughout OSD a very important part of creating a good user experience. Not only is the out-of-box experience a bit bland, it’s unfamiliar and confusing to someone who’s never experienced OSD before. Our goal in this article is to outline how to spice up the end-to-end deployment experience.

At a glance, a user should be able to tell:

  • What’s going on?
  • Where am I in the overall scheme of things?

Should the deployment go awry, these questions become even more important. In one glance, without looking at logs, anyone viewing the screen can answer questions such as:

  • Where did the machine fail?
  • What is the machine name?
  • Does it have an IP address?
  • Etc…

With BGInfo, the available information to display is nearly limitless; you have complete control over what details are visible and important to your organization.

A mockup of what might be used to accomplished this goal is shown below:



Showing Status

All this is possible through the use of BGInfo. With this utility, the background screen can be changed at any point in your Task Sequence.

In the mockup provided, the following practices were taken:

  1. Branding was provided to create familiarity and provide context for what is taking place
  2. Progress was grouped into 5 phases: System Backup, Install Image, Windows Setup, Install Applications, and Restore Backup
  3. One background bitmap was created for each phase; each time a phase completes, the background is changed

So, in the example given, 5 bitmaps were created. Thus, BGInfo will be called 5 times within our Task Sequence. Each bitmap represents the active “Phase” in an “On” position, and all other “Phases” in an “Off” position.


Creating Status Backgrounds

Since our deployment consists of 5 phases, we’ll need 5 different bitmaps. In addition to 5 different bitmaps, we actually need 5 BGInfo configuration files. BGInfo configuration files store rendering information used to display the background; these files are passed to BGInfo as parameters. 

To create a screen, open BGInfo and:

  1. Choose a background image to use
  2. Choose what computer information to display
  3. Format/Justify/Center as preferred

Defining the background image to use, color, and positioning:


Defining what computer information is displayed, and where to position it:


Create all 5 pages in this manner, and save each BGInfo session. After completing these steps, the final list of files will look something like this:



Setting up the Task Sequence

Assuming all the required files exist in one directory, a method for calling the appropriate “Step” is necessary. This can be accomplished through a batch file containing the following:

  • "%~dp0bginfo.exe" "%~dp0step_0%1.bgi" /nolicprompt /silent /timer:0

In this manner, your Task Sequence would simply reference the package and call the batch file with a Step number:



Maintaining Look & Feel

To maintain the look and feel across the entire deployment, there are three areas where adjusting the background image is important for consistency:

  • Task Sequence Wallpaper set through BGInfo (already covered)
  • Windows PE Wallpaper contained in the Boot Image
  • Windows Setup Phase Wallpaper


Boot Image

When initially starting up in Windows PE, a default built-in background image is displayed. Until your Task Sequence begins and the background batch file runs, a user will see whatever background ships in Windows PE.

Apply your own background by opening up the SCCM console, locating your boot image, and modifying its properties. Look for the “Windows PE Background” field:



Windows Setup

After applying and booting into it the new OS (after the “Setup Windows and ConfigMgr” step), an animated black background will appear for the duration of your Task Sequence. Windows Setup overlays a full-screen window named “FirstUXWnd”, displaying the text “Setup is preparing your computer for first use”. Until the Task Sequence has completed in its entirety, this window will be seen and the custom background will not.

Task Sequence background after booting into the new OS:


Assuming you’ve customized the first half of your Task Sequence to show a snazzy look/feel, you’ll probably want to persist this. Especially if your Task Sequence contains a large number of post-OS-install tasks, such as application installs.

One simple and safe workaround is to hide this window. Since we know the window title, we can simply search for it and send it a “hide window” message. However, this requires creating a small application to perform the hide.

Creating this application isn’t too difficult. An example of the API calls necessary to perform this is given below. Using either .NET or native C++, this is relatively simple to create.

  1. Enumerate all windows (EnumWindows)
  2. Search for the window titled “FirstUXWnd” (GetWindowText)
  3. Set the window state to “Hidden” (ShowWindow SW_HIDE | SW_SHOWNORMAL)

Once completed, run this binary from your Task Sequence immediately after the “Windows Setup and ConfigMgr” step.

Update! A complete source-code sample is available here.

You now completely control the deployment look and feel, end-to-end.

Comments (16)
  1. Just adding a little bit of info to this already great post.

    In the new release of MDT (2012), BGinfo64.exe is added within the Tools folder (Templates/Distribution/Tools/x64). This can then be used to make a similar customization for x64 WinPE.

    Also it provides an executable named "WindowHide.exe", which allows you to do exactly what's stated in the very last section of this post, hide a Window, considering the link to the sample does not work.

    Kind regards,


  2. Hi! Have you been able to get this to work in "Windows Server 2012", "Windows Server 2012 R2" and "Windows 8.x" ?

  3. DinoZoff says:

    Nice post but I can't get it to work.

    I created 3 steps in 3 different batch files.

    I followed the procedure but I get an Invalid Directory message or an illegal function.

    Have you got some requirements I have to loook for.

  4. Trey says:

    The link to the source code is broken.  Do you have another place where I can get this?

  5. sammy B says:

    After my XP to Win 7 migration the user logs on and the default wall paper is set to the OSD BGINfo Setup_05.BMP and the windows theme shows up as unsaved theme

  6. anony.muos says:

    I am facing a problem where after booting into WinPE and starting a task sequence, the background will disappear or not show at all, however the hardware info will be displayed. Note, I am using vbscripts and not the built in options of BGinfo. additionally this is running on Windows Server 2012 R2. Before I used this on Windows 7 64-bit and was functional. If someone could shed some light on this, it would be appreciated.

  7. Bob Hyatt says:

    This does not work in windows 8. Anyone else able to get it to work?

  8. Kimzi says:

    To the ones using MDT 2012 and later, the script being used is ztisetbackground.wsf.
    in ur task sequence, create a new "Run Command Line" and write the line: cscript.exe "%deployroot%scriptsztisetbackground.wsf" /image:1

  9. Pushpak says:

    I have created all steps in task sequence,
    but after finish deployment when pc reboots the last step images sets on background permanently, i have to change it manually through personalize.

  10. mmarkt says:

    It works fine but i want to display the OSDComputername and not the Hostname which is the "mini-…." at the background. Is there a way to get the OSDComputername instead of the ?

  11. nereik23 says:

    Might be a dumb question, but I don’t get how you create the step values in the different levels in the TS? Are you adding a condition like:

    if equal step 1; start step1.bat

    At this stage I have tried the following Steps to my TS;

    Where my Install Operating System jobs start, I have created a Run Command Line job first:

    *install Operating System
    Step 1

    **Inside the command line box I have added

    I have it starting in the UNC location on the SCCM server. \sccmsccmsource$OSDCustomScriptsBGInfo. I than have the step1.bat file inside this folder.

    Used the same script code for the bat file as found above, but adapted to the file name I created.

    "%~dp0bginfo.exe" "%~dp0sccm.bgi" /nolicprompt /silent /timer:0

    What am I doing wrong? I feel like I have missed something? is anyone able to explain this a bit further, and also if you have been able to get it to work. Thanks!

  12. Jack says:

    Nice job explaining this, pretty simple to add and really makes for a much more professional look, nice!

  13. Darren Milne says:

    @mmarkt – yes you can have BGinfo display the OSDComputerName.
    You need to create a custom field in BGinfo, using a VBS script located in the same folder as BGinfo.

    Script that I used is here:

    It works fine in WinPE – but Ive been unable to get the custom wallpaper to display once in Windows 8.1.

    I use "ztisetbackground.wsf" which includes a section to hide the "FirstUXWnd" window, but doesnt seem to be working.

  14. whisper says:

    Does anyone still have (Update! A complete source-code sample is available here.) location? It is stating the link is broken and I’d like to be able to persist the background in Win8.1 deployments.

  15. LV123456 says:

    This is a great post, but… Its not complete if you ask me. I’ve searched all over, and this partial guide is all that I’ve found… I’ve followed it to a T, minus the Application for persisting the background during Post OS tasks, and I have had 0 success
    in getting this to work. What is the ideal placement for the steps in the sequence? Can one be placed right after booting into PE? What type of Tasks are best to use? I’ve tried "Run Command Line" and "Install Package".

  16. Shaun Miller says:

    I have put together a solution which works all the way through the build in Windows 7, 8 and 10 and is available on Technet gallery.

    Hope this helps,

Comments are closed.

Skip to main content