Modify WINRE on a running PC
You can modify
the Windows Recovery image on a running PC. The following steps walk you
through mounting a Windows Recovery image, applying an update to it, and then
saving the changes:
1. Open a Command Prompt as
administrator.
2. Create a directory where you can
mount the recovery image to make changes to it.
Windows Command Prompt
md c:\mount
3. Mount your recovery image
with REAgentC:
Windows Command Prompt
ReAgentC.exe
/mountre /path c:\mount
4. With your recovery image mounted,
you can download and add the update package to the Windows RE image.
Windows Command Prompt
Dism /Add-Package
/Image:C:\mount\ /PackagePath:"c:\downloadedupdate\update.msu"
or
Windows Command Prompt
Dism /Add-Package
/Image:C:\mount\ /PackagePath:"c:\downloadedupdate\dynamicupdate.cab"
5. If you added a Dynamic Update
package, validate that the package you added is in your image:
Windows Command Prompt
Dism /Image:C:\mount\ /Get-Packages
Check the list for the update package you just
added. The package should include the KB number, and will show the State as Installed if it's been successfully
added:
Package Identity :
Package_for_KB5021041~31bf3856ad364e35~amd64~~22621.815.1.0
State : Installed
Release Type :
Update
6. Clean up your recovery image and
reset the base of any superseded components:
Windows Command Prompt
dism
/image:C:\mount /cleanup-image /StartComponentCleanup /ResetBase
7. Unmount the Windows recovery
image:
Windows Command Prompt
ReAgentC.exe
/unmountre /path c:\mount /commit
8. If the PC's disk is protected by
BitLocker or Device Encryption: Use ReagentC to disable and then
re-enable Windows RE. This ensures that the updated Windows RE image is turned
on and correctly configured for your Windows installation:
Windows Command Prompt
reagentc /disable
reagentc /enable
The
Windows RE image on the running PC is now updated.
Check the WinRE image version
You can
check the WinRE image's version number on both online and offline Windows
installations. This can be helpful for checking the WinRE version prior to
adding an update, and then after applying an update to verify that the update
was successfully added.
Note
The WinRE
version number will only change after you add an LCU. If you add a DU package,
use DISM /get-packages as described in the steps above to ensure that the
package has been added to the image.
Validate the Windows RE version
in an Online Windows OS
1. Use ReagentC to find the location of the
installed WinRE image by running the following command:
Windows Command Prompt
reagentc /info
This command returns the Windows RE location that
resembles the following example:
Windows Command Prompt
\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
2. Use DISM to get version
information about the winre.wim image located in the path returned by ReagentC
in the previous step. Make sure to add the WinRE image name and image index
number to the path when you run the command:
Windows Command Prompt
Dism /Get-ImageInfo
/ImageFile:\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\winre.wim
/index:1
Notice the reported version. For example:
Windows Command Prompt
Version : 10.0.22621
ServicePack Build :
1
ServicePack Level :
0
Make sure that the ServicePackBuild is greater than or equal to
the UBR for the update that you added. For example, for Windows 11, version
22H2, the November security update would show 819 as the SerivcePack
Build, since
full version number for that update is 22621.819.
·
If the
version reported is an earlier version, this indicates the Windows RE image is
not up to date.
·
If the
reported version is the same or a later version, no action is needed.
Validate the Windows RE version
in an Offline Windows OS
1. Mount the Windows image to a local folder,
for example C:\mount\windows:
Windows Command Prompt
mkdir C:\mount\windows
Dism /Mount-Image
/ImageFile:C:\mount\install.wim /Index:1
/MountDir:C:\mount\windows
2. Use DISM to get version
information about the winre.wim image located in the Windows\system32\recovery folder. Make sure to
specify the image's index number when you run the command:
Windows Command Prompt
Dism /Get-ImageInfo
/ImageFile:c:\mount\windows\windows\system32\recovery\winre.wim /index:1
Notice the reported version. For example:
Windows Command Prompt
Version : 10.0.22621
ServicePack Build :
1
ServicePack Level :
0
Make sure that the ServicePackBuild is greater than or equal to
the UBR for the update that you added. For example, for Windows 11, version
22H2, the November security update would show 819 as the SerivcePack
Build, since
full version number for that update is 22621.819.
·
If the
reported version is an earlier version, this indicates the Windows RE image is
not up to date.
·
If the
reported version is the same or a later version, no action is needed.