Creating Custom Boot Image (boot.wim)

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”\osd\boot\”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:\WinPEx86\winpe.wim 1 C:\WinPEx86\mount

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:\WinPEx86\mount\windows (support for .vbs, .js and .wsf – mandatory for SCCM)

-peimg.exe /install=*WMI* C:\WinPEx86\mount\windows (support for WMI – mandatory for SCCM)

-peimg.exe /install=*XML* C:\WinPEx86\mount\windows (support for XML – mandatory for SCCM)

________________________________________optional components_________________________________

-peimg.exe /install=*HTA* C:\WinPEx86\mount\windows (support for HTA)

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

-peimg.exe /install=*Fonts* C:\WinPEx86\mount\windows (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.

– Copy  Trace32 to C:\WinPEx86\mount\windows\system32 (tool for viewing LOG files – which is a must have)

5. Save a copy of your customised Boot.wim, as the boot.wim used for SCCM will be closed for updates!

Imagex /unmount /commit C:\WinPEx86\mount

Xcopy C:\WinPEx86\winpe.wim C:\WinPEx86\source\winpe.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:\WinPEx86\winpe.wim 1 C:\WinPEx86\mount

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

– Imagex /unmount /commit C:\WinPEx86\mount


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

–  imagex.exe /export C:\WinPEx86\winpe.wim 1 C:\WinPEx86\boot.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.

Should you need to make further changes to the boot.wim, just copy the winpe.wim from C:\WinPEx86\source\winpe.wim  to C:\WinPEx86\winpe.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..

By | 2008-10-29T10:52:03+00:00 October 29th, 2008|OS Deployment|8 Comments

About the Author:

Michael Petersen
Twitter: @OSDeployLinkedin: Michael PetersenMicrosoft Community Contributor


  1. john October 13, 2009 at 9:51 - Reply


    Thanks for publishing this…very helpful. I was wondering if you could send me some step by step instructions in how to modify a wim file. Our image has McAfee and we are now using Forefront. How do i go about in removing McAfee from the image. I’m assuming you would remove McAfee by modyfing the Wim file. Please help. Thanks.

    • Michael Petersen
      Michael Petersen October 13, 2009 at 10:13 - Reply

      You cannot remove installed software from the .wim file by simply mounting it. To remove installed software (like McAfee ) you will have to apply the image to a machine, uninstall, and recapture the image… If you apply the image to a virtual PC, you will not have to worry about driver’s .etc. and you could add Microsoft updates while you are at it.

      If you are using MDT or SMS/SCCM to do your image deployment you could just add a step to do the un-installation, after the image has been applied..

      Michael Petersen

  2. dublinlover November 11, 2010 at 12:44 - Reply

    hello there
    i have vista 32b-i couldnot find ( Microsoft Windows AIK)on it any help

  3. Warren October 8, 2014 at 12:30 - Reply


    Coretech Blog » Blog Archive » Creating Custom Boot Image (boot.wim)

  4. tripadvisor italian kitchen sunderland

    Coretech Blog » Blog Archive » Creating Custom Boot Image (boot.wim)

  5. Ardenia October 9, 2014 at 2:28 - Reply


    Coretech Blog » Blog Archive » Creating Custom Boot Image (boot.wim)

  6. October 10, 2014 at 0:46 - Reply

    Coretech Blog » Blog Archive » Creating Custom Boot Image (boot.wim)

  7. Wilmette October 11, 2014 at 9:35 - Reply


    Coretech Blog » Blog Archive » Creating Custom Boot Image (boot.wim)

Leave A Comment