ConfigMgr 2012: Always including certain files in your Boot Images

Back in the ConfigMgr 2007 days, I wrote a similar blog called ConfigMgr OSD: Always including certain files in your Boot Images -think Trace32.  I figured it was time to create a similar one for ConfigMgr 2012 since some things have changed.  Even though CMTrace is now included in the boot image by default, there are still a few other utilities that I find useful to inject.  Plus, I do not like the fact that CMTrace is not in the path and you have to locate it in order to launch it (i.e. more typing from a command prompt).  Other things like your company’s background image is also nice to include as well.

After making the following changes, any time a boot image is generated (regardless of who does it), the files that you want will always be there.  First, on the Primary Site server, locate a file called osdinjection.xml and open it with Notepad (or your favorite editor).  It will be located in the ConfigMgr installation directory\bin\x64.  This file controls which files get injected into the WinPE Boot Images.  There is a section for each platform.  However, the two common platforms are x86 <Architecture imgArch=”i386”> and x64 <Architecture imgArch=”x64”>.  Underneath each of these sections, there will be a section for WPE, WDT and SCCM.  I add my additions under the SCCM section.  So, for including CMTrace in the Windows\System32 directory, you would add the following under the i386-SCCM section:

<File name="CMTrace.exe">

Make sure to include it before the closing file list tag </Filelist> and save the file.  Also, it is a good idea to make a backup of this file before editing it just in case something happens to the formatting or a tag accidentally gets deleted.  If the file gets corrupt, then all future Boot Images creations will fail. For the x64 boot image, add the following under the x64-SCCM section:

<File name="CMTrace.exe">

Since both architectures of CMTrace.exe are already in the source file locations there is nothing else that needs to be done for these files.  Keep in mind for x64 Boot Images; you will need to use x64 executable files since there is not a WOW 32 bit subsystem in WinPE x64.

Let say you want to increase the log size and history from the default for bare metal builds to 5 MB and 5 roll over logs.  Using Notepad, create a file called smsts.ini with the following contents:


Save the file in the ConfigMgr installation directory\OSD\bin\i386. Next, we need to update both the i386 and x64 SCCM sections with the following:

Place the following under both the imgArch=”i386″ and imgArch=”x64″, SCCM sections:

<File name="smsts.ini">

Since the ini file is not platform specific, we can use the same file in both boot images and do not need to create two separate files.

If you always want to include your company’s background image in your boot images, simply rename it to winpe.jpg and copy it (replacing the existing winpe.jpg) into the ConfigMgr installation directory\OSD\bin\i386 directory.  Future upgrades and service packs may over write these files (including osdinjection.xml), so be sure to add it to your upgrade testing check list.

Add any other scripts, tools or utilities to your boot images using the above process (as long as they do not change frequently).  This prevents the need for having a reference package for WinPE stages.  It is best if they are small in size, otherwise your boot images will balloon in size.

Originally posted on

11 thoughts on “ConfigMgr 2012: Always including certain files in your Boot Images

  1. Pingback: ConfigMgr 2012 OSD: Automatically Open SMSTS log | Mike's Tech Blog

  2. Pingback: ConfigMgr 2012 OSD: Automatically Open SMSTS log | 1E Blogs - Insight and debate on IT Efficiency

  3. Pingback: IT-DevConnections Session Links | Mike's Tech Blog

  4. Pingback: 10 #1 best practices for OS Deployment with ConfigMgr 2012 R2 | Greg's Systems Management Blog

  5. Found a typo (well, whole line missing) from the above;


    should be


    Without correction, can’t update or distribute boot images. DISM.LOG wasn’t much help, was SMSProv.log where I found the issue.

    However, very useful advice none the less, thanks!

    • Hi Robin,
      I have double and triple check my syntax and it absolutely works fine for me – is it possible the code snips aren’t rendering correctly in your browser? You should only need to define the following fields: File name, LocaleNeeded, Source, and Destination. sms\bin\i386 is already in the osdinjection.xml – this is where CM puts CMTrace (which is not in the path). I simply add another location by placing it into Windows\System32 so that it is always in the path. It is possible that your xml file got corrupted or was missing a section, as I have seen this cause issues.

      • My original comment lost some of its text due to being in XML.
        It’s the 4th code clip (“smsts.ini”) that I had a problem with, and which I tried to add to the comment, but everything within angle brackets got removed.
        Re-reading it now, I see the Destination field is there, just not in the usual order (i.e., it’s second, not last). Must be that I overlooked this when adding in the lines.

        Robin Herbert
        Parliamentary ICT
        P Please consider the environment before printing

  6. Pingback: “Permanently” inject files into your boot images « deploymentbits

  7. Pingback: “Permanently” inject files into your boot images « deploymentparts

  8. Pingback: Unloading a Disk Filter Driver in WinPE | Mike's Tech Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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