Creating Custom Boot Image (boot.wim/WinPE )

When using  System Centre Configuration Manager for OS deployment you always use WinPE as your boot media/environment for deploying  the actual image…

Normally you can just use the boot image supplied with SCCM (a WinPE 2.1 wim, taken from WAIK and placed in \”SiteServer”SMS_”SiteCode”osdboot”architecture”boot.wim), with out any further considerations. Well you might have to inject some NIC and Storage drivers, but that’s properly it!

A problem you might run into though, is lacking functionality of that WinPE build, like no HTA, MDAC/ADO support etc, or you might need to ad a “Custom media hook” to run a script prior to starting the task sequence. If that’s the case you will have to make a custom boot image. 

Beneath is an 8 step guide on how to do that…

NOTE – Before you start please read the last two lines in this guide (describes the easy way to do this!!)


1. Use (WAIK) To create a WinPE 2.1 boot image

– Go to <Start><All Programs><Microsoft Windows AIK> and start Windows PE Tools Command Prompt

– Type COPYPE X86 C:WinPEx86 (this is for  32bit, for 64bit change x86 to amd64)

2. Mount the boot image to a temporary directory.

–  imagex.exe /mountrw C:WinPEx86winpe.wim 1 C:WinPEx86mount

3. Install optional components  (Scripting, WMI and XML are required to perform SCCM OS deployments – so they must be installed)

-peimg.exe /install=*Scripting* C:WinPEx86mountwindows (support for .vbs, .js and .wsf – mandatory for SCCM)

-peimg.exe /install=*WMI* C:WinPEx86mountwindows (support for WMI – mandatory for SCCM)

-peimg.exe /install=*XML* C:WinPEx86mountwindows (support for XML – mandatory for SCCM)

________________________________________optional components_________________________________

-peimg.exe /install=*HTA* C:WinPEx86mountwindows (support for HTA)

-peimg.exe /install=*MDAC* C:WinPEx86mountwindows (support for  Database access – mandatory if using MDT DB)

-peimg.exe /install=*Fonts* C:WinPEx86mountwindows (support for ASIA font types)


4. Copy additional files to the Boot.wim. This step is optional and you could add any number of files and programs ex.Trace32.

– Copy  Trace32 to C:WinPEx86mountwindowssystem32 (tool for viewing LOG files – which is a must have)

5. Save a copy of your customised Boot.wim, as the boot.wim used by SCCM must be closed for updates! (PREPED)

Imagex /unmount /commit C:WinPEx86mount

Xcopy C:WinPEx86winpe.wim C:WinPEx86winpeORG.wim /y  (this will be the image to use next time you want to customize) 

6. Finalize the boot image using the following command:

– imagex.exe /mountrw C:WinPEx86winpe.wim 1 C:WinPEx86mount

– peimg.exe /prep C:WinPEx86mountwindows /f  (this will make the Boot image ready for SCCM)

– Imagex /unmount /commit C:WinPEx86mount


7. Export the custom boot image. This step is necessary to reduce the image footprint (reduce the size)

–  imagex.exe /export C:WinPEx86winpe.wim 1 C:WinpeX86ISOsourcesboot.wim

8. Import the boot.wim into Configuration Mgr.

– Right click Boot Images and choose Add Boot Image. Point to the newly created Boot.wim and follow the wizard..

That it.. You now haw a custom boot image or WinPE if you will.

Should you need to make further changes to the boot.wim, just rename C:WinPEx86winpeORG.wim  to C:WinPEx86winpe.wim and start from step 2.

You could of cause integrate MDT with SCCM and the just use the “Create boot image using Microsoft Deployment” wizard found under  <Boot Images><Add Boot Image> and all these steps would be automatically executed. Well now at least you have an idea what is happening..

This entry was posted in WinPE. Bookmark the permalink.

3 Responses to Creating Custom Boot Image (boot.wim/WinPE )

  1. Clay says:

    Awesome blog but I got a question, do you have any idea how to finalize in waik for win 7 (since peimg is no longer there and replaced with dism for most functions)?

  2. Jacob says:

    This is cool but SCCM definitely does not like these custom images. Even though you clearly go through the step of finalizing the image, SCCM thinks that it isn’t finalized. Is this manual process a theory or something that you’ve actually done?Thanks!

  3. Unknown says:

    there is no need to finalize the image with waik for win7, dism takes care of that. Just make sure you export it with imagex to compress it.

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s