This walkthrough describes how to extract the default Windows® RE Image from a Windows® 7 image, and apply a set of supported customizations.
Important: | |
This walkthrough outlines how to build the Windows RE solution, not a complete Windows 7 image. You must still create a separate Windows 7 installation. |
Prerequisites
To complete this walkthrough, you will need the following:
- A technician computer that provides all the
tools and the source files you need to extract a Windows RE
image. For more information, see Building a Technician Computer
[auth_7_phases].
- An authorized copy of a Windows 7
product DVD.
Step 1: Extract the Windows RE image
In this step, you mount a Windows 7 image so that the Windows RE image can be extracted.
- On your technician computer, click Start, point to
All Programs, then Windows OPK or
Windows AIK, and then click Deployment Tools Command
Prompt.
The menu command opens a Command Prompt window and automatically sets environment variables to point to all the necessary tools.
- At the command prompt, create the following directory structure
to store the Windows 7 image and its mount point:
\OS_image \OS_image\mount
- Create the following directory structure to store the
Windows RE image and its mount point:
\winre \winre\mount
- Copy the Windows 7 image from the product DVD into the
technician computer. For example:
Copy D:\sources\install.wim C:\OS_image
- Use the ImageX command with the /mountrw option
to mount the Windows 7 image on the Windows 7 product
DVD. For example,
ImageX /mountrw C:\OS_image\install.wim 1 C:\OS_image\mount
- Copy the Windows RE image from the mounted Windows 7
image. For example:
copy C:\OS_image\mount\windows\system32\recovery\winre.wim C:\winre
- Use the ImageX command with the /unmount option
to unmount the Windows 7 image. For example,
ImageX /unmount C:\OS_image\mount
- Mount the copy of the Windows RE image for editing. For
example:
ImageX /mountrw C:\winre\winre.wim 1 C:\winre\mount
Step 2: (Optional) Add additional Windows PE packages
In this step, you use the DISM tool to import and install optional Windows PE packages to your customized Windows RE image. The default Windows RE image contains the following packages:
- WinPE-SRT
- WinPE-Scripting
- WinPE-Setup
- WinPE-WDS
- WinPE-WMI
You can also import and install language packs. For more information, see Windows PE Customization How-To Topics. In this example, you add HTA support to the Windows RE image.
- In a Windows PE Tools Command Prompt window, type the
following,
dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\<version>\Tools\PETools\x86\WinPE_FPs\winpe-hta.cab" dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"C:\Program Files\<version>\Tools\PETools\x86\WinPE_FPs\en-us\winpe-hta_en-us.cab"
- Verify that the packages were installed by using the
DISM command with the /GetPackages option to view all
packages in the current image. For example,
Dism /image:C:\winre\mount /Get-Packages
Step 3: (Optional) Add mass-storage drivers
If necessary, you can include third-party drivers (.inf files) in your Windows RE image by using the DISM.exe command with the /Add-Driver command. For example,
Dism /image:C:\winre\mount /Add-Driver:<path>
where <path> is the location of the. inf file.
Step 4: (Optional) Add custom recovery tools
While Windows RE provides a set of default troubleshooting and recovery tools, the user experience can be customized to offer additional options to customers. For example, troubleshooting and repair might not resolve the customer’s problems, and it becomes necessary to reinstall Windows or return the computer to its factory condition. You can enable this functionality by pre-installing either a recovery image compatible with Windows Setup or a custom recovery solution.
For more information, see Customizing the Windows RE Experience.
Step 5: Save the Customized Windows RE image
In this step, you capture all the customizations back into the Windows RE image file.
- In a Windows PE Tools Command Prompt
window, commit your customizations and unmount the image by using
ImageX. For example,
ImageX.exe /unmount /commit C:\winre\mount
Next Step
This completes the first part of building a custom Windows RE solution. You can insert your custom Windows RE image back into the mounted Windows 7 image and deploy the image onto a hard drive or recovery media, such as a CD-ROM or DVD-ROM.