Adding Files to the Boot Image in CM2012

A couple of months ago I wrote a post on how to automatically add files to the boot image, as part of the Update distribution point process, using OSDIntection.xml https://blog.ctglobalservices.com/mip/auto-adding-files-to-config-mgr-boot-images/

In CM2012 however, this option is no longer available. Instead the development team has been kind enough, to actually include this service as part of the Boot Image properties, well sort of anyway! What they added is an option to add a prestart Command Hook ( earlier: Media Hook or pre execution hook)

image

This option is obviously intended to add a script or HTA to be launched before choosing what TS to run on the machine, by creating and adding the Command line to TSconfig.ini in the root of the boot image. On top of that it will also copy any files placed in the Source Directory to X:\sms\PKG\SMS10000 and run the command line from there.

To take advantage of the source directory, there must be a command line (or that part will be blanked out). So what I do is run a XCOPY command to place the files in my source directory in corresponding places in the RAM drive (or scratch space) which is always X:\

In this example I would like to place Trace32.exe and some MDT scripts  in in system32, so I can run them regardless of which directory I’m placed in! To do this I simply create a folder structure like this

image

Running xcopy.exe *.* X:\IERHY will copy the entire content of the source to the corresponding folders on the RAM drive, and then exit. 

It’s now possible to run trace32.exe from within the boot image from any location. (Command support, F8 must of cause be enabled aswell).

image

By | 2011-10-17T14:57:25+00:00 October 17th, 2011|Configuration Manager (SCCM), OS Deployment|2 Comments

About the Author:

Michael Petersen
Twitter: @OSDeployLinkedin: Michael PetersenMicrosoft Community Contributor

2 Comments

  1. Travis June 10, 2014 at 17:02 - Reply

    Are you sure the option isn’t available any longer? I’m still seeing an osdinjection.xml file in ..SMSbinX64 and the file has references to both x86 and x64 architectures. I haven’t tried it yet but it would appear this method still works in SCCN 2012.

Leave A Comment