WinRE Manager

Repair and rebuild the Windows Recovery Environment (WinRE) on Windows 10 and 11.

WinRE Manager services winre.wim, injects the OEM and Intel VMD drivers the recovery environment needs, verifies the registered recovery route, and keeps the recovery partition correctly sized. Safe to re-run: a machine that needs no work takes an idempotent fast path that mounts no WIM, does not modify the OS-disk partition layout, and does not disable, re-register, or enable WinRE. Runs on one machine, or as a scheduled SYSTEM task across a managed fleet.


What do you need?

I want to… Start here
Fix WinRE on my own PC Quick start (README) — download, extract, double-click WinRE-Manager.cmd. No PowerShell knowledge required.
Check my PC without changing anything Testing — the read-only harness.
See what the repair would do before running it Run WinRE-Manager.cmd and pick Option 2 — Preview.
Deploy to a managed fleet Deployment — scheduled task XML, Intune, RMM.
Host my own manifest, maps, or base WIM Self-hosting.
Understand how it works Architecture — the four invariants and the pipeline.
Fix a specific error Troubleshooting — log signatures and operator recovery steps.
Read the release history Changelog.

Common Windows Recovery problems

If Windows is telling you something is wrong with the recovery environment, find the message below and start there.

Problem Start here
Windows says it cannot find the recovery environment Troubleshooting
The Windows RE image was not found Troubleshooting
reagentc /enable fails or reagentc /info reports Disabled Troubleshooting
Windows Update reports 0x80070643 (recovery partition too small) Recovery partition
Startup Repair cannot repair the computer automatically Driver injection
You want to inspect the machine without changing anything Testing

The full error-by-error matrix — exact strings, causes, and what WinRE Manager does — is in the README.


Who is this for?

Three audiences. All drive the same control flow on every machine.

flowchart TD
    Start["Windows 10 / 11 machine<br/>with a broken or missing<br/>recovery environment"]

    Start --> Who{"Who is running<br/>WinRE Manager?"}

    Who -->|"Personal PC"| Single["One-off repair<br/>on your own laptop"]
    Who -->|"IT admin / sysadmin"| Fleet["Scheduled deployment<br/>across a managed fleet"]
    Who -->|"MSP / advanced"| Hosted["Hosting your own<br/>manifest, maps, and base WIM"]

    Single --> RunOne["Run WinRE-Manager.cmd<br/>Check · Preview · Repair"]
    Fleet --> RunFleet["Deploy WinRE.ps1 as SYSTEM<br/>via Scheduled Task / Intune / RMM"]
    Hosted --> RunHost["Configure your own<br/>self-hosted sources"]

    RunOne --> Flow["Same control flow<br/>on every machine"]
    RunFleet --> Flow
    RunHost --> Flow

    Flow --> Fast{"What does it find?"}
    Fast -->|"Nothing to fix"| FP["Tier 1 · fast path<br/>no OS-disk changes"]
    Fast -->|"WinRE registered, disabled"| EO["Tier 2 · enable-only<br/>prepare volume · re-register"]
    Fast -->|"WinRE missing or broken"| FU["Tier 3 · full update<br/>plan · shrink · rebuild · deploy"]

    FP --> Dedicated["DEDICATED WinRE<br/>on a dedicated recovery partition"]
    EO --> Dedicated
    FU --> Dedicated
    FU --> Fallback["OS-FALLBACK WinRE<br/>on C: · degraded but functional"]

    style Start fill:#1f6feb,stroke:#1f6feb,color:#fff
    style Dedicated fill:#238636,stroke:#238636,color:#fff
    style Fallback fill:#9e6a03,stroke:#9e6a03,color:#fff
    style Hosted fill:#8957e5,stroke:#8957e5,color:#fff
You are You should read
💻 A single-machine user, repairing your own laptop Quick start — download, extract, double-click WinRE-Manager.cmd
🏢 An IT admin or sysadmin, deploying to a managed fleet Deployment — run as SYSTEM under a scheduled task
🔧 An MSP or sysadmin hosting your own inputs Self-hosting — own manifest, OEM maps, and base WIM repository

The four design invariants

Every decision in the codebase follows these four rules, in this order:

  1. Never break Windows RE.
  2. Never leave a machine without a working recovery route — to the extent the machine, its OS, and its storage stack allow.
  3. Minimize the reagentc /disable → reagentc /enable window.
  4. Do no work unless needed. When work is needed, prepare everything before touching anything.

Rules 1–3 are invariants: no code change may weaken them. Rule 4 is the working rule — the discipline by which rules 1–3 are enforced on the fast path, the enable-only path, and the destructive path. Full hierarchy, enforcement tables, and reasoning: Architecture.


Safety by design

The destructive path is surrounded by protections implemented in the code rather than relying on operator assumptions. Every preparation — planning the partition layout, resolving and verifying the driver artifacts, building and normalizing the candidate image — completes before WinRE is disabled or any partition is deleted. A failure before destruction leaves the old recovery route intact; a failure during the destructive sequence restores the previous state where the design can, and names the one residual corner it cannot close. The manager also refuses to run unelevated, on a non-x64 architecture, or concurrently with another instance, and it never modifies the OS volume’s BitLocker state.

The full model — every protection, the code path that enforces it, and the residual corner the deliberate post-deletion failure test is intended to close — is documented in README — Safety by design, Architecture, and Recovery partition.


Three tiers of work

Tier When What happens
Tier 1 — fast path The machine is healthy. No WIM is mounted, the OS-disk partition layout is not modified, no reagentc mutation is issued. Runtime is dominated by Windows’ own CIM and PnP enumeration.
Tier 2 — enable-only The image is current, but WinRE is disabled. The target recovery partition is prepared, the image is re-registered, and reagentc /enable is called. No partition geometry change, no image rebuild, no C: shrink.
Tier 3 — full update The image is missing, stale, or the recovery partition is wrong-sized. The only path that may perform destructive partition changes. Every preparation — OEM pack, VMD package, base WIM, strip stage, injection, export — completes before the first byte of the recovery partition is touched. If any preparation fails, the script stops and the old recovery route is preserved. If the destructive attempt runs but cannot create a dedicated partition, the machine ends in OS-fallback (WinRE on C:\Recovery\WindowsRE, exit code 2, degraded but functional).

Full pipeline, checkpoints, and the state model: Architecture and State and idempotency.


What WinRE Manager fixes

WinRE Manager exists because “reinstall Windows” is not a repair. The full error-by-error matrix — the exact error strings, the underlying cause, and what WinRE Manager does — is in the README. The failure classes:

Detailed write-ups:

Failure class Guide
Missing or corrupted winre.wim, disabled WinRE Troubleshooting
Partition sizing and geometry Recovery partition
OEM / VMD driver selection and injection Driver injection
Build drift, stale images, deployment identity State and idempotency
Exit codes and orchestration Exit codes

Documentation

Guide Use it for
Deployment Scheduled tasks, MDM, fleet rollout, and deployment-time translations of the four design invariants
Self-hosting Replacing the manifest, OEM maps, and base WIM repository with your own hosting
Architecture The four design invariants, the pipeline, the control-flow invariants, and the state-carrying artifacts
Recovery partition Sizing, geometry planning, replacement behavior
Driver injection OEM/VMD selection, downloads, validation, and the third-party driver strip stage
State and idempotency DesiredStateId, checkpoints, deployment state, deferral sidecar
Testing Read-only harness and recommended regression checks
Troubleshooting Log signatures and operator recovery steps
Exit codes Full exit-code matrix and orchestration policy
Changelog Release history and per-machine field evidence

Current release

Component Version
scripts/WinRE.ps1 v48 patch 2
scripts/Test-WinRE.ps1 (read-only harness) v27
scripts/WinRE-Manager.cmd (interactive wrapper; ships with the release)

v48 patch 1 raised ScriptVersion from 47 to 48, so every managed machine performs one full-update pass on its next scheduled run, then returns to the fast path. v48 patch 2 kept ScriptVersion at 48 and added a fail-fast elevation guard and a source-WIM hash cache; a machine already on v48 patch 1 continues on the fast path. Full release notes, migration steps, and per-machine field evidence: Changelog.


Requirements at a glance

Full requirements and caveats: README § Requirements.


Field-tested hardware

Selected results. Full per-machine evidence: Changelog.

Vendor Model OS Result
ASUS PRIME H510M-D (i5-11400) Win11 26300 v47 patch 1 — clean non-destructive migration from v46
AB8139 (DMI) LX15PRO (Ryzen 7 5825U) Win11 26300 v48 patch 1 — first field validation of the intervening-anchor path on the exact C: \| D: \| Recovery layout that motivated it
Dell Pro Max 16 Premium MA16250 (Core Ultra 7 265H) Win11 26300 v47 patch 2 — full rebuild with Dell WinPE11 A10 OEM pack; 64 drivers injected
ASUS Vivobook X1504ZA (i3-1215U) Win11 26300 v47 patch 2 — C: actively encrypting at 91% during run; dedicated-partition path completed
HP EliteBook 8 G1i 16” (Core Ultra 5 235U) Win11 26300 v46 patch 2 — clean destructive rebuild
Lenovo IdeaPad 3 15IAU7 (MT 82RK) Win11 26200 v46 patch 1 — the machine that motivated the plan-clamp fix
(VM) Hyper-V Win11 / Win10 MBR Win11 26300 / Win10 19045 v45 patch 1 — destructive path and MBR partition-attribute path verified end-to-end

The v44 patch 7 destructive path is field-verified on encrypted C: across eight distinct physical machines. The remaining coverage gaps — post-deletion failure on the intervening-anchor path, the v48 multi-intervening and surplus rejections, the transactional-WIM rollback branch, and the architecture gate on ARM64 — are documented in Testing.


Repository


Repository: github.com/ArthurJDurand/WinRE-Manager · Docs: ArthurJDurand.github.io/WinRE-Manager