Back home > Windows Vista Recovery Environment


2/2007 - The Windows Recovery Environment (WinRE) in Windows Vista replaces the Recovery Console found in Windows XP.  And where installing the Recovery Console was a fairly simple process in XP, installing WinRE in Vista is not quite as simple.

The Recovery Console in Windows XP was/is used for advanced repair and recovery options and procedures for Windows XP computers.  It could be installed from the Windows XP CD in a fairly straight forward process.  The installation created a c:\cmdcons directory on your C: drive and the Recovery Console could be added as a boot option during XP boot up.

The Recovery Console is gone in Windows Vista.  Instead, you have the new Windows Recovery Environment.  However, a big difference with WinRE is there is no easy way to install this on your Vista hard drive.  Microsoft does not provide an install routine for WinRE.  Microsoft prefers you run WinRE from the Vista install DVD.  Now there is nothing wrong with this, but how often have you needed your install CD/DVD only to spend an interminable amount of time looking for it? The following procedures will allow you to install WinRE on your local hard drive so you won't have to hunt for the DVD.

  How to install The Windows Recovery Environment on your Vista PC

Note: The following is meant for advanced users or IT professionals. You will be modifying the system partition on your hard drive, and if done incorrectly, it could render your PC unbootable.

What’s Needed
Windows Vista DVD
WAIK for Windows Vista (Windows Automated Installation Kit)
A PC with Windows Vista Installed

<enter> means press the Enter key
You know how to open an elevated command prompt in Vista
You have a basic understanding of ImageX and the WAIK
You have a basic understanding of DOS

Basic Steps
Create a winre.wim image file that is the Windows Recovery Environment
Add a file to the winre.wim image file
Copy the modified winre.wim file to the root of C:\
Modify the F8 Advanced Boot Menu to run WinRE

The WinRE Windows Blog

1. Install the Windows Automated Installation Kit on the Vista PC.  A little bit of a pain if you don't have this installed.  You have to download an image of the WAIK from MS, create a DVD from the image (the same as creating a DVD from an ISO file), then install it from the DVD.  You can download the WAIK for Windows Vista here.

2. Insert the Windows Vista DVD into the DVD drive of the Vista PC (cancel out of the install window if it opens).

3. Click Start > Programs > Microsoft Windows AIK. Right click the Windows PE Tools command prompt entry and choose Run as administrator (you will need admin access for some of this).

4. Create 2 directories. Winreimage will be used to store the newly created winre.wim image file. Winremount will be used to open the winre.wim image file and make changes to it.

md c:\winreimage
md c:\winremount

5. Next, type the following to create the WinRE image file that is needed to run the Windows Recovery Environment.

imagex.exe /export /boot e:\sources\boot.wim 2 c:\winreimage\winre.wim “WinRE”

(where e: is the DVD drive. Use whatever drive letter is assigned to your DVD drive)

Once this completes, you will have a file in c:\winreimage called winre.wim. This is the image file that is the Windows Recovery Environment.

6. Mount the image file you just created from the Vista DVD at the Windows PE Tools command prompt (this is where you will need admin access). This step is needed because you will need to add a file to the winre.wim image file (next step).

imagex /mountrw c:\winreimage\winre.wim 1 c:\winremount <enter>

(FYI…If you now look in c:\winremount, you will see a directory structure like Windows.)

7. You now need to create an .ini file called winpeshl.ini that will launch the WinRE shell at startup. Open Notepad and create a file called winpeshl.ini that contains the following text:



Save this file as winpeshl.ini and copy it to the \Windows\System32 directory in your mounted WinRE directory. At the Windows PE Tools command prompt do this by typing the following:

copy winpeshl.ini c:\winremount\Windows\System32 <enter>

8. Save the changes to the WinRE image you have created and modified. You do this by unmounting the image using ImageX. At the Windows PE Tools command prompt, type the following:

imagex.exe /unmount /commit c:\winremount <enter>

(FYI…If you now look in c:\winremount, you will see the directory structure that was there, is gone.)

9. The winre.wim image file in c:\winreimage is now updated and ready to use. It should be about 118MB in size.

10. Copy the winre.wim file to the root of c:\

11. Also copy another needed file to the root of c:\ This file is called boot.sdi, and you can find it in the WAIK, under C:\WAIK\Tools\PETools\x86\boot. (use the path to your installation of the WAIK)

12. One last thing. Now that you have created the necessary files for the Windows Recovery Environment, you need to be able to access the Windows Recovery Environment. You do this through the F8 Advanced Boot Menu during boot up. To add WinRE to the F8 boot menu, you need to run the SetAutoFailover.cmd script provided in the WAIK. This script is located under C:\WAIK\Recovery (use the path to your installation of the WAIK).
Open an elevated command prompt window, change directory to C:\WAIK\Recovery, and type the following:

setautofailover.cmd /target c: /wim /nohide <enter>

After you run this, you will see a number of lines saying “operation completed successfully”.

13. Now reboot your Vista PC. Press F8 to go into the Advanced Boot Menu - after you hear the 1st beep during boot. The first item on this menu should be "Repair your computer." Choosing this option will take you into the Windows Recovery Environment.

14. After you have tested your Windows Recovery Environment, you can delete the 2 directories you created - c:\winreimage and c:\winremount.

Below are links to more information about the Windows Recovery Environment

Windows Automated Installation Kit (WAIK)

Windows Recovery Environment Technical Reference

WinRE Blog