📎 AI Summary:
The thread centers on a PowerShell tool for repairing Windows Recovery Environment registration, partition capacity, and missing drivers; its developer reports successful tests on several systems but notes untested destructive paths and a residual failure risk. A response recommends cautious diagnosis, backups and boot-level validation, clarifies that KB5034441 was a Windows 10 issue, and asks how partition sizing and race detection work; the overall tone is constructive but cautious.

ArthurDurand

Member
Member details
Joined
Oct 5, 2026
Messages
1
Thread Author #1
Hi all,

I've been reading the recovery partition threads here for a while and wanted to share something I built. It's a PowerShell script that manages the Windows Recovery Environment — it repairs broken WinRE registrations, rebuilds winre.wim with the correct drivers, and resizes recovery partitions that have been outgrown by Windows Updates. MIT-licensed, single file.

I built it because three Windows 11-specific failure modes kept breaking machines:

1. 0x80070643 after KB updates. Windows pushes a WinRE update that requires more space than the OEM's recovery partition has. The update fails, and the partition is technically present but undersized by 50–200 MiB. This is the one that generates the most "Windows Update broke my recovery" threads here.

2. Device Encryption on 24H2+. The encryption service claims a newly created partition before the recovery type GUID can be applied. reagentc /enable then refuses with "Windows RE cannot be enabled on a volume with BitLocker Drive Encryption enabled." The machine has a recovery partition, but WinRE cannot use it.

3. VMD storage drivers missing from WinRE. On 12th-gen Intel and later, the recovery image needs the Intel VMD driver to see the OS disk. Without it, Startup Repair and Reset this PC fail with INACCESSIBLE_BOOT_DEVICE.

The script runs idempotently. On a healthy machine it takes a fast path — no WIM mount, no partition touch, no reagentc call. On a broken machine it does a full rebuild: strips the image to zero third-party drivers, injects the correct OEM/VMD recipe, resizes the recovery partition, and re-registers WinRE.

What took the longest to get right:

  • The reagentc /disable → /enable window. Everything that doesn't require a disabled WinRE runs before the disable. A race detector re-reads the registered image immediately before /disable and aborts if Windows Update serviced it during preparation.
  • Target-volume BitLocker policy. reagentc checks the target volume, not C:. The dedicated-partition and enable-only paths don't care about C:'s encryption state. Only the OS-fallback route does.
  • Driver strip normalization. Every rebuild strips the mounted image to zero third-party drivers, proven by re-enumeration, before injecting the current recipe. Otherwise drivers accumulate across rebuild cycles.
Field-verified on:

  • Dell Pro Max 16 (Core Ultra 7) — full rebuild, 64 drivers injected, 1,000 MiB partition rejected as undersized, new 1,100 MiB partition created, reagentc /enable exit 0
  • Two ASUS Vivobooks (both mid-encryption at 91%) — dedicated-partition path completed, new partition not re-claimed by Device Encryption
  • ASUS PRIME H510M-D — fast path, DEDICATED, exit 0
What it doesn't do yet:

  • The strip stage hasn't been exercised against a source image with third-party drivers in production
  • The destructive partition paths are VM-tested but not physical-hardware-tested under the current code
  • A known residual corner: a post-deletion failure on an encrypted C: can leave the machine without a dedicated recovery partition or OS-fallback
Repo is github.com/ArthurJDurand/WinRE-Manager if anyone wants to look at the code. More interested in the failure modes than the tool — if you've hit the KB5034441 class of failures, how are you handling it?
 

WindowsForum AI

AI
Staff member
Robot
Member details
Joined
Mar 14, 2023
Messages
117,107
ArthurDurand, thanks for separating the field results from the untested paths. The post-deletion failure on encrypted C: is the part I’d prioritize before broader deployment, ahead of adding more OEM recipes.
I don’t have personal fleet results to contribute, and this isn’t a code audit, but here’s how I’d approach the failure modes you described.

Diagnose separately; repair minimally​

  1. Establish the actual failure first: capture the failing KB, reagentc /info, partition layout and free space, target-volume encryption state, and servicing logs. I wouldn’t authorize repartitioning from the update error alone.
  2. Separate registration, capacity, and driver remedies. I’d prefer an insufficient-space repair not to trigger driver replacement unless driver validation independently fails.
  3. Require a recovery plan before partition changes: a verified backup, accessible BitLocker recovery key, and external recovery media tested on that machine. Given your acknowledged failure window, I’d make destructive paths explicitly opt-in and subject to review.
  4. Validate beyond registration: my acceptance test would include booting into WinRE, confirming that it sees the OS disk, and checking that the next run makes no changes—not just accepting reagentc /enable exit 0.

Points worth tightening​

  • KB5034441 is a Windows 10 example, not a Windows 11-specific failure. Microsoft retired it and moved its content to KB5042320 in August 2024. That update explicitly requires 250 MB of free space, rather than a particular total partition size. It’s a useful analogy, but I’d distinguish it from your Windows 11 cases.
  • Driver completeness matters more than a zero-driver baseline. Microsoft’s guidance is to include the third-party drivers required to boot. My concern with stripping everything is whether the replacement recipe proves that coverage for each machine; I’d make an image containing pre-existing OEM drivers a release-gating test.
  • Keep the encryption observation scoped to the tested systems. Your ASUS results are useful evidence, but I’d want timestamped partition-type and encryption-state observations before treating the “claimed before GUID assignment” explanation as a general 24H2+ mechanism.
Two implementation questions interest me most: what exact size/headroom calculation rejected 1,000 MiB but accepted 1,100 MiB, and does the race detector compare image content or just path, size, and timestamps? I’d also distinguish “detects a change during preparation” from “prevents a change after the final check.”
 
Last edited: