WinRE in Windows 10 or 11

The Windows Recovery Environment (WinRE) is a minimal operating system based on the Windows Preinstallation Environment (WinPE) image that includes several tools to repair, reset, and diagnose Windows.

Windows RE consists of three files on a hidden Recovery Partition (in older versions of Windows, this partition was known as the System Reserved partition.)

  • winre.wim – WIM image with WinPE environment that includes additional Windows recovery tools;
  • boot.sdi – a System Deployment Image (SDI) file used to create an in-memory WinRE RAM disk;
  • ReAgent.xml — WindowsRE configuration file.

How to Boot Into the WinRE from Recovery Partition

a) To boot your computer into the Windows Recovery, hold down Shift and click the Restart button on the Start menu.

b) You can also restart the computer in WinRE mode from the command prompt using the /o option of the shutdown command:

shutdown /f /r /o /t 0

c) There is another command to force the system to boot into the Recovery Environment the next time the computer boots:

reagentc /boottore

d) The recovery environment should start automatically if there are problems with the normal Windows boot process. The recovery environment should start automatically if there are problems with the normal Windows boot process. For example, if three previous attempts to start Windows normally have failed, the computer will automatically boot into the Windows Recovery environment. This means that to boot your computer into WinRE, all you have to do is interrupt Windows boot by pressing the power button 3 times in a row.

How to Enable WinRE

Assign letter R: for Recovery tools partition.

C:\Users\Administrator>reagentc /info
Windows 恢复环境(Windows RE)和系统初始化配置
信息:

Windows RE 状态: Disabled
Windows RE 位置:
引导配置数据(BCD)标识符: 2d8dcfb0-c8d7-11ed-9447-e8f5c5e29244
恢复映像位置:
恢复映像索引: 0
自定义映像位置:
自定义映像索引: 0

REAGENTC.EXE: 操作成功。

C:\Users\Administrator>diskpart

Microsoft DiskPart 版本 10.0.17763.1

Copyright (C) Microsoft Corporation.
在计算机上: REMOTE-MACHINE

DISKPART> list disk

磁盘 ### 状态 大小 可用 Dyn Gpt
-------- ------------- ------- ------- --- ---
磁盘 0 联机 60 GB 15 GB *
磁盘 1 联机 100 GB 1024 KB * *
磁盘 2 联机 10 GB 1024 KB * *

DISKPART> select disk 0

磁盘 0 现在是所选磁盘。

DISKPART> list partition

分区 ### 类型 大小 偏移量
------------- ---------------- ------- -------
分区 1 主要 1024 MB 1024 KB
分区 2 系统 115 MB 1025 MB
分区 3 主要 39 GB 1140 MB
分区 4 主要 4591 MB 55 GB

DISKPART> list volume

卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 D NTFS 跨区 109 GB 正常 页面文件
卷 1 Z HotPEToolBo UDF DVD-ROM 646 MB 正常
卷 2 恢复 NTFS 磁盘分区 1024 MB 正常
卷 3 C 64WinXP NTFS 磁盘分区 39 GB 正常 启动
卷 4 F 新加卷 NTFS 磁盘分区 4591 MB 正常
卷 5 EFI FAT32 磁盘分区 115 MB 正常 系统

DISKPART> select volume 2

卷 2 是所选卷。

DISKPART> assign letter R

DiskPart 成功地分配了驱动器号或装载点。

DISKPART> exit

Deploy Windows RE to Recovery tools partition.

C:\Users\Administrator>mkdir R:\Recovery\WindowsRE

C:\Users\Administrator>xcopy /h C:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE
C:\Windows\System32\Recovery\Winre.wim
复制了 1 个文件

C:\Users\Administrator>reagentc /setreimage /path R:\Recovery\WindowsRE /target C:\Windows
目录设置为: \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE

REAGENTC.EXE: 操作成功。

C:\Users\Administrator>reagentc /enable
REAGENTC.EXE: 操作成功。

C:\Users\Administrator>reagentc /info
Windows 恢复环境(Windows RE)和系统初始化配置
信息:

Windows RE 状态: Enabled
Windows RE 位置: \\?\GLOBALROOT\device\harddisk0\partition1\Recovery\WindowsRE
引导配置数据(BCD)标识符: abf28c6a-ac71-11ef-9211-005056a9ba48
恢复映像位置:
恢复映像索引: 0
自定义映像位置:
自定义映像索引: 0

REAGENTC.EXE: 操作成功。

Remove letter R: for recovery tools partition.

C:\Users\Administrator>diskpart

Microsoft DiskPart 版本 10.0.17763.1

Copyright (C) Microsoft Corporation.
在计算机上: REMOTE-MACHINE

DISKPART> list volume

卷 ### LTR 标签 FS 类型 大小 状态 信息
---------- --- ----------- ----- ---------- ------- --------- --------
卷 0 D NTFS 跨区 109 GB 正常 页面文件
卷 1 Z HotPEToolBo UDF DVD-ROM 646 MB 正常
卷 2 R 恢复 NTFS 磁盘分区 1024 MB 正常
卷 3 C 64WinXP NTFS 磁盘分区 39 GB 正常 启动
卷 4 F 新加卷 NTFS 磁盘分区 4591 MB 正常
卷 5 EFI FAT32 磁盘分区 115 MB 正常 系统

DISKPART> select volume 2

卷 2 是所选卷。

DISKPART> remove letter R

DiskPart 成功地删除了驱动器号或装载点。

DISKPART> exit

Reference

Windows Recovery Environment (Windows RE)