Sitting I my seat at approximately 30.000 feet, on my way to MMS in Vegas, I thought I might as well spend some time writing a post on the good old Osdinjection.xml file.
As some might know this file can be used to customize, which files get added to the boot images when updating the distribution point.This method of adding files to the boot image has been around since at least Config.Mgr SP1 (or that’s when I started using it anyway) but it still seams not that many people take advantage of it.
So here is how I use it, and a description of the syntax:
First navigate to \\siteserver\sms_sitecode\bin\i386 and make a copy of Osdinjection.xml. This is to make sure we can return to the original file if something goes wrong. This is also the file that we are going to modify.
Now navigate to \\siteserver\sms_sitecode\OSD and make a folder called custom, like this:
In that custom folder we will now place the files we want to add to the boot image whenever we update the distribution point (remember that the boot image is rebuild each time this is done).
In my case I have placed, a tools folder for different tools I might want to add, a custom media hook file, the media hook executable file and trace32.
I obviously want to place these files in different places in the boot image, like TSconfig.ini must of cause be in the root directory, and trace32 I want in system32 so I can launce it from anywhere. That’s where the osdinjection.xml file comes into play. Open the Osdinjection.xml file and add the following custom section just beneath <InjectionFiles>.
You will notice that TScinfig.ini and RunHTA.exe I placed in the destination “\” which resolves to the root of the boot image or the X drive if you will.
The tools folder is placed in destination Tool, and since that folder does not exist, it will be created in the root. Also notice that by using the file name=”*” all files from the source, custom\tools, will be copied to the destination in the boot image, including subfolders.
Finally Trace32.exe is placed I the destination windows\system32. If you want to place many files in system32 you might want to use the solution from the tools folder setup.
Now all you have to do is update you x86 boot image on the distribution point, and the files will automatically be added. Should you then want more files, or perhaps want to change the existing ones, all you have to do, is to make the necessary changes to your custom folder, and update the distribution point again.
Note: If you want to update your x64 bit boot image you must change the imgArch to x64,