Customizing WinPE 3.1 and WinPE 4.0 boot images for use in ConfigMgr 2012 R2 RRS feed

  • General discussion

  • With ConfigMgr 2012 R2, importing of WinPE 3.1 for Operating Systems Deployment is supported. The support also extends to importing of WinPE 4.0 boot images. While importing of WinPE 3.1 and WinPE 4.0 boot images is supported, servicing them is not supported and the option is not available. Servicing includes adding/removing optional components, enabling command support, changing background image and adding drivers.

    This document describes steps that will help you in servicing boot images outside of ConfigMgr that you can import into ConfigMgr 2012 R2.

    The following is described in this document. The command line examples use WinPE 3.1 from WAIK but they can be easily translated to WinPE 4.0 from Windows 8 ADK.

    1. Adding optional components
    2. Adding drivers
    3. Enabling command shell in WinPE

    Install WAIK/ ADK

    The first and foremost requirement for servicing WinPE 3.1 and WinPE 4.0 boot images and then importing into ConfigMgr is installing WAIK for WinPE 3.1 and Windows 8 ADK for WinPE 4.0.

    WAIK is available for download here: http://www.microsoft.com/en-us/download/details.aspx?id=5753

    Windows 8 ADK is available here: http://www.microsoft.com/en-us/download/details.aspx?id=30652

    Getting the boot image

    The boot image (winpe.wim) in WAIK can be found from the WAIK installation path e.g. C:\Program Files\Windows AIK\Tools\PETools\amd64\winpe.wim.  Copy winpe.wim to another folder e.g. C:\WinPEWAIK

    Mount using DISM

    DISM is a command line utility available with the Deployment and Imaging tools of ADK. The executable can be found in the ADK or WAIK installation directory. The following command mounts the boot image

    dism.exe /mount-wim /wimfile:C:\WinPEWAIK\winpe.wim /index:1 /mountdir:C:\WinPEMount

    Add Optional Components

    After mounting, the boot image is ready to be serviced. Optional components and drivers can now be added to the boot image using DISM. The optional components to be added to the boot images can be found in the installation directory of WAIK or ADK whichever one you are using. For WinPE 3.1 the optional components are located in C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_OCs\. After you have identified the optional components to be added, the following command adds them to the mounted boot image. Add the following components to the mounted image. More components can be added as needed.

    -          Winpe-wmi.cab

    -          Winpe-script.cab

    -          Winpe-wds-tools.cab

    dism.exe /image: C:\WinPEMount /add-package /packagepath:"C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_OCs\winpe-wmi.cab"

    dism.exe /image: C:\WinPEMount /add-package /packagepath:"C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_OCs\winpe-script.cab"

    dism.exe /image: C:\WinPEMount /add-package /packagepath:"C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_OCs\winpe-wds-tools.cab"

    Add Drivers

    If you are imaging hardware that needs specific drivers, the drivers can be added to the boot image using DISM. If it is not required, then you can skip this step. The following command adds a driver to the mounted boot image

    dism.exe /image: C:\WinPEMount /add-driver /driver:<path to driver .ini file>

    Commit and unmount boot image

    Now that you have added the optional components and drivers, servicing of the boot image is complete and it has to be now unmounted and the changes committed to the wim file. The following command unmounts the wim file and commits the changes you have made.

    dism.exe /unmount-wim /mountdir: C:\WinPEMount /commit

    Import boot image into ConfigMgr

    Now that you have serviced your boot image and are ready to use it for imaging using task sequences in SCCM, you can import it. Importing can be done by launching the SCCM admin console and navigating to Software Library -> Operating Systems-> Boot Images.

    *Note that the boot images properties will have those tabs hidden that provide servicing capabilities.

    Enable Command shell

    For debugging and troubleshooting purposes in WinPE, the command shell may need to be enabled. The following steps will enable command shell in a boot image

      1. Open WMI instance corresponding to the boot image package you imported using "Open Instance". The package ID for the boot image can be found in the boot image list view under the Image ID column in SCCM Admin Console.

    SMS_BootImagePackage.PackageID = “<packageID>”

    1. Update property EnableLabShell and set its value to True.
    2. Refresh the list view in Admin Console and right- click on the imported boot image and select Update Distribution Points action.

    Wednesday, June 26, 2013 7:19 PM

All replies

  • The Command Shell addition confuses me a little - doesn't SCCM mount, service the boot image and commit changes when you 'Update Distribution Points' in order to add Command Support?  This seems in conflict to the statement that 'servicing them is not supported'.  Could you expand on that?

    My Personal Blog: http://madluka.wordpress.com

    Wednesday, June 26, 2013 7:50 PM
  • There is no command shell addition. The steps provided use DISM which comes with the WAIK and ADK.

    Wednesday, June 26, 2013 8:47 PM
  • Are you saying that ConfigMgr 2012 R2 does not fully support WinPE 4.0 boot images unlike it's predecessor? What does/will it use - Windows 8.1 (WinPE 4.1??)

    My Personal Blog: http://madluka.wordpress.com

    Thursday, June 27, 2013 6:48 AM
  • Windows 8.1 (WinPE 4.1??)

    That's used in the R2 preview.

    Torsten Meringer | http://www.mssccmfaq.de

    Thursday, June 27, 2013 7:02 AM
  • According to Wikipedia, the next version of WinPE is 5.0, based on the Windows 8.1 code base.
    Tuesday, August 20, 2013 6:16 PM
  • These steps are for customizing WinPE 4.0 and 3.1. Servicing of these boot images will not be allowed by Configuration Manager 2012 R2.
    Tuesday, August 20, 2013 7:08 PM
  • Are there any other options available for servicing boot images other than using DISM?

    Looking at the following link:http://technet.microsoft.com/en-us/library/dn387582.aspx

    For example, when you have System Center 2012 R2 Configuration Manager, you can customize boot images from Windows ADK 8.1 (based on WinPE 5) from the Configuration Manager console. However, while boot images based on WinPE 3.1 and WinPE 4 are supported, you must customize them from a different computer and use the version of DISM that is installed with the associated version of Windows AIK or Windows ADK. Then, you can add the boot image to the Configuration Manager console.

    It is a big change for the end user, since we used to be able to simply import drivers when needed and add them to our boot images directly in the SCCM console, to having to using DISM on our older boot images to mount the boot image manually and make our changes.

    Can anyone think of a better way to manage the 3.1 and 4.0 boot images?  I have a need to use a 3.1 boot image in a large pc upgrade (1000's of computers) and there may be many different hardware models out there, it seems crazy that each time we come across a new model that requires drivers added to the boot image, that we must manually edit the boot image using DISM.

    Wednesday, October 16, 2013 9:00 PM
  • here's another way of looking at how to create these custom boot wims,


    another alternative is to stand up a CM07sp2  lab and use the boot images in there, export them from the console, and import them into CM12.

    Step by Step Configuration Manager Guides > 2012 Guides | 2007 Guides | I'm on Twitter > ncbrady

    Tuesday, October 22, 2013 8:09 PM
  • Can you just make a copy your WinPE 3.1 boot wim from 2012 before you upgrade to SP1+R2.  Then import that same boot.wim(3.1) into R2 since it already has drivers, customizations already done to it?


    Tuesday, October 29, 2013 3:07 PM
  • Thank you for this post. 

    The command shell part makes things a little easier for us running W7

    Tuesday, October 29, 2013 4:24 PM
  • yes you can.

    Step by Step Configuration Manager Guides > 2012 Guides | 2007 Guides | I'm on Twitter > ncbrady

    Saturday, November 30, 2013 11:47 PM