Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

Displaying OSDComputername in MDT WinPE background picture

Posted on April 20, 2015 by Jörgen Nilsson

One very appreciated feature in Configuration Manager 2012 when you integrate it with MDT is the background pictures showing OS deployment step, IP Address, MAC Address and so on to the end user och technician deploying the computer.

The first two steps are shown in WinPE only and under Computer Name in the background the generated Minint-3242 is displayed as computer name. I wrote a little powershell script which will simply write the OSDComputername variable to the registry in WinPE so we can read it from there with BGinfo and show both the WinPE name and the OSDComputername. It will look something like this:

Step2

I like the flexibility of running the scripts in the Task Sequence instead of modifying the Boot image so I run the script as a Run Powershell Script step in the Task Sequence. Start by doing the following:

  1. Make sure you have the Powershell component included in the Boot Image for the script to be able to run.
  2. Save a Powershell script with the following content.
    Param(
    [string]$OSDcomputerName
    )
    New-Item -Path HKLM:\Software -Name OSD –Force
    New-ItemProperty -Path HKLM:\SOFTWARE\OSD -Name OSDComputername -PropertyType String -Value $OSDcomputerName
  3. Save this script in a folder and create a package in SCCM with the folder as source path so we can use it later in the Task Sequence.
  4. In the Task Sequence before the step you are displaying in WinPe add the following step, select the package to run the script from and enter the %OSDComputername% in the Parameters to pass the OSDComputername variable to the script.
    WinpeCname1
  5. After that edit the STEP_02.BGI file by launching your MDT 2013 Toolkit package under \Tools\x86 in your package source directory  by launching Bginfo.exe from that directory.
  6. In BGinfo select File, Open the STEP_02.BGI file, then you will see the information displayed in the background.
  7. Select Custom and add the following value, the path should be HKEY_LOCAL_MACHINE\SOFTWARE\OSD\OSDComputerName
    WinpeCname2
  8. You will see a warning that the registry value doesn’t exist accept that and then we go on and edit the information displayed.
  9. Edit the background to look something like this.
    WinpeCname3
  10. Then save the STEP_02.BGI file. If you are using the State Capture Step do the same with that step or save this one with the STEP_01.BGI filename instead.
  11. Update the MDT 2013 Toolkit package so that the new .BGI files are updated on the DP’s and then you are good to go!

I haven’t tested it with MDT 2012 but I cannot see why it shouldn’t work.

  • BGinfo
  • Deployment
  • Deployment Step
  • MDT
  • 3 thoughts on “Displaying OSDComputername in MDT WinPE background picture”

    1. Justin says:
      April 21, 2015 at 2:02 am

      You can also use a custom field in BGInfo and use a VBScript to grab the OSDComputerName rather than having to worry about the registry:

      On Error Resume Next
      Set TSEnv = CreateObject(“Microsoft.SMS.TSEnvironment”) ‘ CREATE SMS ENVIROMENT CompuerName = TSEnv(“OSDComputerName”)
      echo CompuerName

      Reply
      1. Jörgen Nilsson says:
        May 17, 2015 at 10:29 pm

        Hi,
        Thanks for your feedback! I did try that but in some scenarioes BGinfo ended up without the information, that is why I went back to using the registry.
        /Jörgen

        Reply
    2. Ahmad says:
      September 28, 2015 at 4:31 pm

      Hi,

      step three is not clear to me, can you please explain it a bit.

      Reply

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
    All code is provided "AS-IS" with no warranties.

    Tweets by ccmexec

    Recent Posts

    • Windows Servicing, Personal Teams and Success.cmd
    • Windows MDM Security Baseline – Settings Catalog
    • Configuring MS Edge Security Baseline v107 using Settings Catalog
    • Configuring Desktop App Installer using CSP and script?!
    • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell

    ©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
    This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
    Privacy & Cookies Policy

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT