Deploy Windows RE
Use these steps to deploy Windows Recovery Environment (Windows RE) to a new computer, to help end users repair a PC when a system failure occurs.
To complete this walkthrough, you need the following:
- A destination computer that has been configured with a Windows RE tools partition, and optionally, a recovery image partition. For more information, see Capture and Apply Windows, System, and Recovery Partitions.
- Optional: Customize your recovery media. For more information, see Customize Windows RE.
- Optional: Customize your recovery media to include custom tools. For more information, see Add a Custom Tool to the Windows RE Boot Options Menu.
Step 1: Deploy Windows RE
Create a new directory in the Windows RE Tools partition, and then copy your custom Windows RE tools image (Winre.wim) to this directory. The following are examples based on your firmware type:
mkdir T:\Recovery\WindowsRE xcopy /h W:\Windows\System32\Recovery\Winre.wim T:\Recovery\WindowsRE
where T: is the drive letter of your Windows RE Tools partition. For example:
mkdir S:\Recovery\WindowsRE xcopy /h W:\Windows\System32\Recovery\Winre.wim S:\Recovery\WindowsRE
where S: is the system partition.
Register your custom Windows RE tools image:
C:\Windows\System32\Reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows
where T: is the Windows RE Tools partition.
C:\Windows\System32\Reagentc /setreimage /path S:\Recovery\WindowsRE /target W:\Windows
where S: is the System partition.
Optional: If you have added a custom tool to your Windows RE boot image, register it so that it will appear on the Boot Options menu:
Reagentc /setbootshelllink /configfile E:\Recovery\BootMenu\AddDiagnosticsToolToBootMenu.xml
For more information about adding a custom tool, see Add a Custom Tool to the Windows RE Boot Options Menu.
Optional: Configure a hardware recovery button (or button combination) to run a secondary boot path that contains Windows RE. For more information, see Add a Hardware Recovery Button to Start Windows RE.
Step 2: Identify the Recovery Partitions and Hide the Drive Letters
Note If you want to configure push-button reset features for Windows 8 editions, skip this section, and go to the topic: Deploy Push-Button Reset Features.
Configure your partitions as recovery partitions, and then conceal the drive letters so the partitions don't appear in common Windows menus, such as File Explorer.
Prepare a DiskPart script to identify the recovery partitions and to hide drive letters
In Notepad, create a text file that includes commands to identify and hide the recovery partitions. The following examples are based on your firmware type:
Use the ID: PARTITION_MSFT_RECOVERY_GUID (de94bba4-06d1-4d40-a16a-bfd50179d6ac) to define the partitions as recovery partitions.
Use the GPT attributes: 0x8000000000000001 to hide the drive letters and to mark them as required, by using a combination of two attributes: GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER and GPT_ATTRIBUTE_PLATFORM_REQUIRED.
For more information about UEFI hard drive partition attributes, see PARTITION_INFORMATION_GPT structure.
rem == HideRecoveryPartitions-UEFI.txt select disk 0 select partition 1 remove set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac gpt attributes=0x8000000000000001 rem == If Push-button reset features are included, add the following commands: rem select partition 5 rem remove rem set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac rem gpt attributes=0x8000000000000001 list volume
Use the attribute:
id=27to define the system partition, and use the
removecommand to remove the drive letter.
rem == HideRecoveryPartitions-BIOS.txt select disk 0 select partition 3 set id=27 remove list volume exit
Save your completed file as either E:\Recovery\HideRecoveryPartitions-UEFI.txt or E:\Recovery\HideRecoveryPartitions-BIOS.txt, based on your firmware type.
Identify and hide the drive letters
Run the diskpart script to identify and hide the recovery partitions:
Diskpart /s E:\Recovery\HideRecoveryPartitions-<firmware>.txt
Where <firmware> is either UEFI or BIOS.
Verify that the Windows RE configuration is set correctly
Open an administrative command prompt.
Verify the Windows RE information:
Verify the following:
- Windows RE status is enabled.
- Windows RE location is on the correct partition.
- The BCD GUID entry for WinRE is the same as the WinRE GUID entry in the file: reagent.xml. On BIOS-based PCs, this file is on the system partition, at \Recovery\(GUID)\. On UEFI-based PCs, this file is on the Windows RE Tools partition, at \Recovery\WindowsRE\.
- WinRE is located in the \Recovery\WindowsRE directory