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 http://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)
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
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).