Forum Discussion
KB5034441 fails to install with error code 0x80070643.
I've found the easiest and safest workaround for Windows RE update problem is to (1) disable Windows RE, (2) change the Windows RE partition type from "Recovery" to "Primary", (3) enable Windows RE, apply the update, then repeat the first three steps, changing the partition type back to "Recovery". You don't need to resize or delete partitions.
WARNING: The steps below involve making changes to your hard disk's partition table. Any misstep could render your system unbootable and potentially result in data loss. This may not work for everyone. Stop if your results at any step are inconsistent with those shown below. Proceed at your own risk.
From an elevated PowerShell prompt, use reagentc to check the current Windows RE state.
PS> reagentc /info
...
Windows RE status: Enabled
Windows RE location: \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
The Windows RE status should show Enabled. Make note of the hard disk and partition number.
Disable Windows RE.
PS> reagentc /disable
This should move Windows RE image file Winre.wim from \Recovery\WindowsRE on the hidden partition to C:\Windows\System32\Recovery.
IMPORTANT: This doesn't appear to occur in every case. Verify that Winre.wim exists in C:\Windows\System32\Recovery. If it doesn't, reenable Windows RE with reagentc /enable and stop. This file is normally hidden. Use the -Force parameter with dir (in PowerShell) to see it.
PS> dir C:\Windows\System32\Recovery -Force
Directory: C:\Windows\System32\Recovery
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2/4/2024 3:37 AM 1139 ReAgent.xml
---hs- 8/6/2021 8:26 PM 440718104 Winre.wim
Use diskpart to temporarily change the type of the recovery partition. Select the disk and partition using the numbers in the Windows RE location shown above.
PS> diskpart
DISKPART> select disk 0
Disk 0 is now the selected disk.
DISKPART> select partition 4
Partition 4 is now the selected partition.
IMPORTANT: Verify that you've selected the correct partition. The selected partition is marked with an asterisk and should show as type Recovery.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 260 MB 1024 KB
Partition 2 Reserved 16 MB 261 MB
Partition 3 Primary 237 GB 277 MB
* Partition 4 Recovery 860 MB 237 GB
Display partition details to show the partition type.
DISKPART> detail partition
Partition 4
Type : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden : Yes
Required: Yes
Attrib : 0X8000000000000001
Offset in Bytes: 255158386688
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
* Volume 2 Windows RE NTFS Partition 860 MB Healthy Hidden
Change the partition type from Recovery to Primary (normal).
If the type is 27, this is an MBR partition. Set the type to 7.
DISKPART> set id=7 override
If the type is de94bba4-06d1-4d40-a16a-bfd50179d6ac, this is a GPT partition. Set the type to ebd0a0a2-b9e5-4433-87c0-68b6b72699c7.
DISKPART> set id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 override
List the partitions to verify that the change was applied.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 260 MB 1024 KB
Partition 2 Reserved 16 MB 261 MB
Partition 3 Primary 237 GB 277 MB
* Partition 4 Primary 860 MB 237 GB
Exit diskpart.
DISKPART> exit
When you re-enable Windows RE, if a valid recovery partition isn't available, reagentc will use C:\Recovery\WindowsRE as the location for the recovery image. If a WindowsRE directory already exists in C:\Recovery, rename it.
PS> dir C:\Recovery -Force
Directory: C:\Recovery
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 12/2/2020 8:57 PM WindowsRE
d---- 3/20/2022 3:10 AM OEM
-a--- 1/12/2021 4:35 AM 1139 ReAgentOld.xml
PS> ren C:\Recovery\WindowsRE WindowsRE.old -Force
Re-enable Windows RE and confirm that the location has changed. Here, it changed from partition4 to partition3, which, in this case, is the OS partition (C:\).
PS> reagentc /enable
PS> reagentc /info
Windows RE status: Enabled
Windows RE location: \\?\GLOBALROOT\device\harddisk0\partition3\Recovery\WindowsRE
At this point, attempt to apply the Windows Update. Regardless of success or failure, complete the steps below to reverse the changes made above.
PS> reagentc /disable
PS> diskpart
DISKPART> select disk 0
DISKPART> select partition 4
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 260 MB 1024 KB
Partition 2 Reserved 16 MB 261 MB
Partition 3 Primary 237 GB 277 MB
* Partition 4 Primary 860 MB 237 GB
For GPT partition
DISKPART> set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac override
For MBR Partition
DISKPART> set id=27 override
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 260 MB 1024 KB
Partition 2 Reserved 16 MB 261 MB
Partition 3 Primary 237 GB 277 MB
* Partition 4 Recovery 860 MB 237 GB
DISKPART> exit
PS> reagentc /enable
...
Windows RE status: Enabled
Windows RE location: \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
Disabling Bitlocker seems to work as well. PRSGroupIT