Customize Windows RE

Applies To: Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

You can customize Windows® Recovery Environment (Windows RE) by adding packages (Windows PE optional components), languages, drivers, and custom diagnostic or troubleshooting tools.

In this topic:

  • Step 1: Mounting the Windows and Windows RE Images

  • Step 2: Adding Languages

  • Step 3: Adding Boot-Critical Drivers

  • Step 4: Adding a Custom Tool

  • Step 5: Unmount the Images

Prerequisites

To complete this walkthrough, you need the following:

Step 1: Mounting the Windows and Windows RE Images

To customize Windows RE, you must mount both the Windows base image file, and the Windows RE image file inside that image.

Note

We recommend that when you update your Windows reference images with boot-critical drivers and languages that you update the included Windows RE image at the same time, to help make sure that any necessary files are included in both images.

To extract and mount the Windows RE image

  1. On your technician computer: Click Start, and type deployment. Right-click Deployment and Imaging Tools Environment and then select Run as administrator.

  2. At the Deployment and Imaging Tools Environment command prompt, create a copy of the image file. In the Windows product DVD, this file is located at \sources\install.wim:

    md c:\mount
    
    xcopy D:\sources\install.wim C:\mount
    
  3. Mount the Windows image for editing:

    md C:\mount\windows
    
    Dism /mount-image /imagefile:C:\mount\install.wim /index:1 /mountdir:C:\mount\windows
    

Note

If you use a copy of the base Windows image from the product DVD, you can use any of the available images.

  1. Mount the Windows RE image for editing:

    md C:\mount\winre 
    
    Dism /mount-image /imagefile:c:\mount\windows\windows\system32\recovery\winre.wim /index:1 /mountdir:C:\mount\winre
    

Note

The Windows RE image should always be index number 1.

Step 2: Adding Languages

When you add languages to Windows RE, you need to add the base language pack and the corresponding language packs for each of the Windows PE optional components in the Windows RE tools image.

Note

To ensure a consistent language experience in recovery scenarios, add the same set of languages to the Windows RE image that you add to the Windows image. Do not add more than ten language packs to a Windows image. Multiple language packs increase the size of the Windows image and also affect the overall performance of a system during deployment and servicing.

To add language packs

  1. List the Windows PE optional components in the Windows RE tools image:

    Dism /Get-Packages /Image:C:\mount\winre
    
  2. Review the resulting list of packages, and then add the corresponding language packs for each package in the image, including the base Windows PE language pack.

    For example, the following code shows how to add the French (fr-fr) language pack to the base Windows PE image, and then to each of the optional components that are present in the default Windows RE image for Windows 8.1 and Windows Server 2012 R2:

    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\lp.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-Rejuv_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-EnhancedStorage_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-Scripting_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-SecureStartup_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-SRT_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-WDS-Tools_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-WMI_fr-fr.cab"
    
    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\fr-fr\WinPE-StorageWMI_fr-fr.cab"
    
  3. If you're adding language packs for Japan, Korea, or China, add the font packages for these languages. Here's an example for Japan:

    Dism /image:C:\mount\winre /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Font Support-JA-JP.cab"
    

    For more info, see WinPE: Add packages (Optional Components Reference).

Step 3: Adding Boot-Critical Drivers

Add any third-party drivers that your reference computer requires to boot, such as storage or video drivers. For more information, see WinPE: Mount and Customize.

Note

Alternatively, you can add any boot-critical drivers that are not included in the basic Windows image by using your answer file.

To add a boot-critical driver

  • If your reference computer requires a third-party driver to boot, you must add the driver (.inf file) by using the Dism command together with the /Add-Driver option. For example:

    Dism /Image:C:\mount\winre /Add-Driver /Driver:"C:\SampleDriver\driver.inf" 
    

    where C:\SampleDriver\driver.inf is the location of the .inf file.

Step 4: Adding a Custom Tool

You can add a custom troubleshooting or diagnostic tool to your Windows RE image. Be aware that when adding a custom tool, there are additional steps required to register the custom tool during deployment. For more information, see Add a Custom Tool to the Windows RE Boot Options Menu.

Step 5: Unmount the Images

When you are satisfied with the Windows RE boot image, save your changes back into the Windows RE and Windows base images.

To save the custom image

  • At the Deployment and Imaging Tools Environment command prompt, unmount the Windows RE image:

    Dism /unmount-image /mountdir:C:\mount\winre /commit
    
  • Optional: make a backup copy of the Windows RE image. You can often reuse the same customized Windows RE image for multiple PC configurations.

    copy C:\mount\windows\windows\system32\recovery\winre.wim C:\mount\winre_backup_x64_with_fr-fr.wim
    
  • Unmount the base Windows image:

    Dism /unmount-image /mountdir:C:\mount\windows /commit
    

Next Steps

If you’re deploying Windows using Windows Setup, update the other Windows images inside the base Windows file (Install.wim).

If you’re deploying your reference image by using Windows PE, Diskpart, and DISM, then continue to Deploy Windows RE.

See Also

Tasks

Add a Custom Tool to the Windows RE Boot Options Menu
Deploy Windows RE
Deploy Push-Button Reset Features

Reference

REAgentC Command-Line Options

Concepts

Windows Recovery Environment (Windows RE) Overview