Chris Nackers

ConfigMgr / SCCM

OSD: How to add a script to a ConfigMgr 2007 Boot Image

2010-10-29

From the archive (2010). Written for the tools of the time, so some details may be out of date.

One of the components of System Center Configuration Manager 2007 (SCCM 2007) Operating System Deployment (OSD) is boot images. Boot images in SCCM are really just WinPE images and are used during the operating system deployment process to boot computers so that an operating system can be loaded.

For more information about boot images and WinPE, see the following links:

What is Windows PE?

Planning for the Boot Image

Background

Typically, the standard boot images included in SCCM will provide enough functionality needed to deploy an Operating System, (outside of possibly adding drivers). In some cases, it may be required for administrators to have a script or a command run when the boot image boots and WinPE is started. As an example, one customer, due to specific network restrictions, had to run a command when WinPE started so that a specific route could be added in order for the client to reach the server. The customer created a batch file to run the command and configured WinPE to execute it at every start time, before WinPE started the task sequencing process.

Out of the box, it is not very straightforward to add such customizations to your boot images, so the purpose of this article is to provide information on how to add a batch file or command so that it is executed when your boot image starts.

As a note, there was an article provided in TechNet which describes the process of modifying WinPE to add a script or batch file so that it would be executed when WinPE started. Unfortunately, in SCCM, when boot images are updated so that drivers can be injected or settings are modified, the update process is automated so there isn’t an opportunity to make other customizations. The article I am referring to is http://technet.microsoft.com/en-us/library/cc766521(WS.10).aspx, which provides three ways to add a command to WinPE. The first two methods, using Winpeshl.ini, or Startnet.cmd, don’t work in SCCM. The third method, creating an unattend.xml, will work fine.

This article describes how to create an unattend.xml so that specific commands or scripts can be executed every time your WinPE boot image starts.

Read the full post here.