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
- JagerbomberFeb 23, 2024Copper Contributor
PRSGroupITI got the update installed with your way and I got the Recovery Partition back to Recovery. (I even redid it by recreating it, too) but WinRE still uses the Primary OS partition. It won't seem to go back to the Recovery Partition. Do I even want it to? I got to this thread because I was still getting the error after recreating the Recovery Partition and ended up with 499MB (all Free). Is there going to be issue with future updates if it still says it's using the OS Partition? Winre.wim isn't appearing anymore which surprised me.
- JohnDoe007Mar 08, 2024Copper Contributor
Hi PRSGroupIT - could you please reply to Jagerbomber's message? I think Arto has tried twice but appears to be assuming that the recovery partition is not the right type. In my case, the recovery partition IS the right type (GPT = de94bba4-06d1-4d40-a16a-bfd50179d6ac) but reagentc does not use the partition when it is renabled.
- Arto_MontonenFeb 25, 2024Copper Contributor
Jagerbomber If the recovery partition is the wrong type, then windows does not accept it and it automatically creates hidden folder C:\Recovery where the recovery files are stored, when the WinRE enablement command is given. Command triger automatic file copy function. This is something I have learned the hard way. Because of this, the WinRE partition can also point to the wrong partition.
In my case, I fixed the Recovery partition type to the correct one and Windows accepted it. Microsoft's own instructions made the wrong type of partition and I followed them exactly. Because of this, the recovery partition was broken and the new location of WinRE became automaticly C:\Recovery hidden folder. In the case of an MBR disk, Microsoft's own instructions create a recovery partition whose ID is actually 7. The MBR recovery partition ID must be 27 and windows does not accept the ID number 7. The situation with a GPT disk is different and chaos occurs when the instructions for GPT and MRB disks are mixed together. GPT is needed on hard drive size is over than 2TB, because the MBR disk maximum limit is broken. This can cause a problem if the physical Windows hard disk needs to be copied to a larger than 2TB hard disk and the old hard disk is saved as MBR type.
- Azucho98Feb 25, 2024Copper Contributor
Arto_Montonen If the recovery partition is the "wrong type"? The partitions were created by MICROSOFT during the windows 10 install media for EVERY machine I have that refuses to apply this update. So please explain how the recovery partition can be "the wrong type", or even the wrong size for that matter.
- phenomizeFeb 08, 2024Copper Contributor
Disabling Bitlocker seems to work as well. PRSGroupIT