A practical step-by-step guide to recreating the Windows Recovery Environment partition with built-in tools: DiskPart, REAgentC, and the WinRE image file.
A Windows recovery partition is a small hidden partition that stores the Windows Recovery Environment, also called Windows RE or WinRE. Windows uses it to start repair tools when the normal operating system cannot boot.
When the recovery partition is configured correctly, you can use features such as Advanced startup, Startup Repair, System Restore, Command Prompt, Uninstall Updates, and Reset this PC.
WinRE can load recovery tools even when Windows fails to start normally.
A separate recovery partition helps Windows boot repair tools on encrypted system drives.
Windows updates may need free space inside the recovery partition to service the WinRE image.
winre.wim and recovery configuration files, not a complete copy of your personal files, apps, or Windows installation.
Creating a recovery partition requires changing the disk layout. The commands are not difficult, but selecting the wrong disk or partition can make Windows unbootable or delete data. Prepare before you touch DiskPart.
On BitLocker-protected systems, suspend protection temporarily before resizing or recreating recovery partitions. Re-enable it after you verify that WinRE works.
Command Prompt as administratormanage-bde -protectors -disable C: -RebootCount 2
After the recovery partition is configured and tested, turn BitLocker protection back on:
Command Prompt as administratormanage-bde -protectors -enable C:
list disk, list volume, and list partition before selecting anything. Replace example numbers with the real numbers from your PC.
First, check whether Windows RE is already enabled. In many cases you do not need to create a new partition; you only need to repair the WinRE configuration or increase the free space in the existing recovery partition.
Command Prompt as administratorreagentc /info
Look for these lines in the result:
| Line | Good result | What it means |
|---|---|---|
Windows RE status |
Enabled | WinRE is registered and should be available from Advanced startup. |
Windows RE location |
A path that points to a recovery partition | Windows knows where the winre.wim image is stored. |
Recovery image location |
May be blank on Windows 10 and later | This older reset-image field is usually not required for modern Windows recovery. |
Most Windows 11 PCs and many Windows 10 PCs use UEFI + GPT. Older upgraded systems may still use Legacy BIOS + MBR. Check it before creating the recovery partition.
DiskPartdiskpart
list disk
exit
If there is an asterisk under the Gpt column for the Windows disk, use the GPT instructions. If the Gpt column is blank, use the MBR instructions.
The recovery partition should be large enough for winre.wim plus extra free space for future WinRE updates. A practical size for most Windows 10 and Windows 11 systems is 1 GB. If you use many language packs, OEM tools, or custom WinRE drivers, use 1.2 GB to 1.5 GB.
| Scenario | Suggested size | Notes |
|---|---|---|
| Standard Windows 10 or Windows 11 PC | 1024 MB |
Recommended for most home and office PCs. |
| Small disk or older Windows 10 layout | 750 MB minimum practical target |
May work, but can leave less room for future WinRE servicing. |
| Custom WinRE image, OEM tools, multiple languages | 1200โ1500 MB |
Use more space if winre.wim is unusually large. |
Ideally, place the recovery partition immediately after the Windows partition. This layout allows Windows to resize or recreate the recovery partition more easily when future updates require more space.
C: โ Windows RE tools partition.
Use this method on most modern Windows 10 and Windows 11 computers. It creates a new NTFS partition, stores WinRE files in R:\Recovery\WindowsRE, marks the partition as a Microsoft recovery partition, and hides the drive letter.
C: and that the system disk is disk 0. If your Windows installation is on another disk, adjust the commands after checking list disk and list volume.
Command Prompt as administratorreagentc /disable
This creates a new partition from 1024 MB of space taken from the end of C:. If you want a larger recovery partition, change 1024 to 1200 or 1500.
DiskPart for GPT / UEFIdiskpart
list disk
select disk 0
list volume
select volume C
shrink desired=1024 minimum=1024
create partition primary size=1024
format quick fs=ntfs label="Windows RE tools"
assign letter=R
exit
Windows RE normally uses the file winre.wim. The default source location is C:\Windows\System32\Recovery. If this file is missing, see the troubleshooting section below.
Command Prompt as administratormkdir R:\Recovery\WindowsRE
copy C:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
Command Prompt as administratorreagentc /setreimage /path R:\Recovery\WindowsRE /target C:\Windows
reagentc /enable
reagentc /info
Run DiskPart again, find the new recovery partition number, select it, set the Microsoft recovery partition type, assign the required GPT attributes, and remove the temporary R: drive letter.
DiskPart for GPT / UEFIdiskpart
select disk 0
list partition
select partition YOUR_RECOVERY_PARTITION_NUMBER
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes=0x8000000000000001
list volume
select volume R
remove letter=R
exit
R: in File Explorer, but reagentc /info should show Windows RE status: Enabled.
Use this method only if list disk shows no asterisk in the Gpt column for the Windows disk. MBR systems use a different recovery partition ID.
Command Prompt as administratorreagentc /disable
DiskPart for MBR / Legacy BIOSdiskpart
list disk
select disk 0
list volume
select volume C
shrink desired=1024 minimum=1024
create partition primary size=1024
format quick fs=ntfs label="Windows RE tools"
assign letter=R
exit
Command Prompt as administratormkdir R:\Recovery\WindowsRE
copy C:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
reagentc /setreimage /path R:\Recovery\WindowsRE /target C:\Windows
reagentc /enable
reagentc /info
DiskPart for MBR / Legacy BIOSdiskpart
select disk 0
list partition
select partition YOUR_RECOVERY_PARTITION_NUMBER
set id=27 override
list volume
select volume R
remove letter=R
exit
REAgentC.exe is the built-in Windows tool for configuring the Windows Recovery Environment. Creating a partition is only half of the task. You must also tell Windows where the recovery image is located.
reagentc /setreimageSets the folder that contains winre.wim. Use this after copying the image to the recovery partition.
reagentc /enableEnables Windows RE for the running Windows installation.
Requiredreagentc /infoChecks whether WinRE is enabled and where Windows is looking for the recovery image.
VerifyCommand Prompt as administratorreagentc /setreimage /path R:\Recovery\WindowsRE /target C:\Windows
reagentc /enable
reagentc /info
If reagentc /info still shows Disabled, do not continue deleting or recreating partitions. First confirm that R:\Recovery\WindowsRE\winre.wim exists and that you selected the correct Windows installation path.
After you create the partition and enable WinRE, verify the configuration before you rely on it.
reagentc /info and confirm that Windows RE status is Enabled.This command tells Windows to boot into the recovery environment on the next restart:
Command Prompt as administratorreagentc /boottore
shutdown /r /t 0
winre.wim is missingIf C:\Windows\System32\Recovery\Winre.wim does not exist, you need to restore it from another healthy Windows installation, from the old recovery partition, from an OEM recovery source, or from matching Windows installation media.
Check whether winre.wim existsdir C:\Windows\System32\Recovery\Winre.wim /a
If you mounted a Windows ISO and it contains install.wim, you can mount an image index and copy winre.wim. Replace E: with the mounted ISO drive and choose the correct image index for your edition.
Advanced recovery image extractionmkdir C:\WinRE_Mount
dism /Get-WimInfo /WimFile:E:\sources\install.wim
dism /Mount-Image /ImageFile:E:\sources\install.wim /Index:1 /MountDir:C:\WinRE_Mount /ReadOnly
copy C:\WinRE_Mount\Windows\System32\Recovery\Winre.wim C:\Windows\System32\Recovery\
dism /Unmount-Image /MountDir:C:\WinRE_Mount /Discard
install.esd instead of install.wim. In that case, export the needed image to a WIM first or use a matching ISO that already includes install.wim.
reagentc /enable says operation successful, but WinRE is still disabledThis usually means Windows accepted the command but could not actually use the recovery image location. Check the file path, the partition type, the XML configuration, and whether the partition was hidden before the image was registered.
R:\Recovery\WindowsRE\winre.wim exists before removing the R: letter.reagentc /disable, then run reagentc /setreimage again.id=27 on MBR disks.DiskPart may fail to shrink the Windows partition if unmovable files are near the end of the volume. Try these fixes before using third-party partition software:
powercfg /h off.C: or reduce its disk usage.defrag C: /X on HDDs. On SSDs, Windows will optimize safely according to the drive type.shrink desired=1024 minimum=1024 again.If the partition is visible as R: or another drive letter, hide it after verifying WinRE:
DiskPartdiskpart
list volume
select volume R
remove letter=R
exit
If an existing recovery partition is too small, it may be better to resize or recreate it with more free space instead of creating a second recovery partition. A 1 GB recovery partition usually avoids many servicing problems on current Windows 10 and Windows 11 systems.
winre.wim is available, you can shrink the Windows partition, create a new recovery partition, copy the WinRE image, and register it with reagentc.reagentc /info points to the new partition and Windows RE starts correctly. If you are not sure, leave the old partition untouched until you have a full disk backup.winre.wim.A working Windows recovery partition needs three things: enough NTFS space for winre.wim, the correct GPT or MBR recovery partition ID, and a valid REAgentC configuration. After creating it, always run reagentc /info and test Advanced startup before you delete any old recovery partition or rely on the new one.