Q. How do I install the Windows Recovery Environment (RE) locally on my computer?

A. After you create the WIM file containing the Windows RE environment, you can use it locally as a boot option. The partition into which you install Window RE should ideally be separate from the OS installation partition (in case it's corrupted) and if BitLocker is running, you should install it onto the unencrypted system partition. Also the partition should be hidden, if possible, and to avoid conflict with advanced volume management, created before other OS partitions. If this isn't an option, you can install the Windows RE onto the Vista partition, however it won't be useful in a corrupted partition scenario. To install Windows RE, follow these steps:

  1. Copy the winre.wim and boot.sdi files to the root of the partition that will host Windows RE. The boot.sdi file can be found in the C:\Program Files\Windows AIK\Tools\PETools\x86\boot folder of the Windows AIK).
  2. From an elevated command prompt run the SetAutoFailover.cmd, which is in the Recovery folder of the Windows AIK, passing the location of the Windows RE environment, as the following example shows: D:\>SetAutoFailover.cmd /target C: /wim /nohide If you plan to use Sysprep on the computer after Windows RE is installed, the command in step 2, the SetAutoFailover, must be called in the OOBESystem phase of installation via the FirstLogonCommands otherwise the sysprep /generalize will corrupt the recovery environment. Once you run this, the boot loader will show recovery information (bcdedit with no switches), as the following example shows:
    Windows Boot Loader
    -------------------
    identifier \{current\}
    device partition=C:
    path \Windows\system32\winload.exe
    description Microsoft Windows Vista
    locale en-US
    inherit \{bootloadersettings\}
    recoverysequence \{572bcd56-ffa7-11d9-aae0-0007e994107d\}
    recoveryenabled Yes
    osdevice partition=C:
    systemroot \Windows
    resumeobject \{c72b5f11-bd5d-11db-ad7b-8b4a0ba8402e\}
    nx OptIn
  3. During system start, press F8 (quickly) and a recovery option will be displayed in the boot option menu.
When the recovery option is selected, after entering credentials for a local user account (e.g., Administrator with a blank password) you get full access to all Windows RE options, such as startup repair, system restore, and the command prompt.