Built a self-healing WinRE manager for Windows 11 — sharing the failure modes and what I learned about the recovery partition lifecycle


So you would recommend everyone to use your script to check and maintain their recovery partition even when their system is running at top notch, though they don't use, and have not ever used, the partition? I'd run it on my spare laptop but don't want to bork it. But I suppose running a Restore with Macrium or Hasleo would sort things out if something did go South.
 

My Computers My Computers

  • At a glance

    Windows 11 Home, ver 25H2 build 26200.8894Intel Core i5 5200U @ 2.20GH4 GBIntel HD Graphics 5500 on board
    OS
    Windows 11 Home, ver 25H2 build 26200.8894
    Computer type
    Laptop
    Manufacturer/Model
    Hewlett-Packard Spectre 13-4001 x360 convertable
    CPU
    Intel Core i5 5200U @ 2.20GH
    Motherboard
    Hewlett-Packard 802D
    Memory
    4 GB
    Graphics Card(s)
    Intel HD Graphics 5500 on board
    Sound Card
    Intel Smart Sound Technology (Intel SST)
    Hard Drives
    Micron 256GB M.2 2280 NGFF SSD MTFDDAV256TBN, (SATA 6.0 Gb/s)
    Keyboard
    Model # G01KB
    Antivirus
    Microsoft Defender
    Other Info
    born on date: 25 Feb 2016
  • At a glance

    Win 11 Home 25H2 build 26200.8894Intel Core i7 4th Gen 4790 (3.60GHz), Haswell...Samsung 16 GB DDR3 (8GB in 2 modules)NVIDIA GeForce GTX 760, 3GB, and on-board Int...
    Operating System
    Win 11 Home 25H2 build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus Desktop model M32AD-US019S (DOM: 6/9/2014 )
    CPU
    Intel Core i7 4th Gen 4790 (3.60GHz), Haswell 22nm Technology, SOCKET 1150
    Motherboard
    H81M-E/M51AD/DP_MB
    Memory
    Samsung 16 GB DDR3 (8GB in 2 modules)
    Graphics card(s)
    NVIDIA GeForce GTX 760, 3GB, and on-board Intel HD Graphics 4600 Rev 6
    Monitor(s) Displays
    HP EliteDisplay E241i LED; HP EliteDisplay E243
    Hard Drives
    Samsung 500GB SSD, 870 EVO (SATA 6.0 )
    Micron 250GB SSD, CT250MX500
    Toshiba HDD, 3GB (original drive w/PC)
    Case
    ASUS
    Keyboard
    ASUS-------------------------
    Antivirus
    MS Defender
    Other Info
    purchased 8/28/2015 from Newegg.
  • HEWLETT PACKARD
    HP OmniBook X Flip NGAI (Next Gen AI),
    Model: 16-as0023dx
    PT# B5UH1UA#ABA Product #: B5UH1UA
    delivered and setup 7/25/25
    16" 2K Touch-Screen Laptop
    Intel Core Ultra 7 256V '24 Series 2 - CPU
    Boost Clock Frequency 4.8 gigahertz; Neural Processing Unit (NPU) Yes;
    16GB Memory, LPDDR5X
    1TB SSD PCIe 4.0
    Graphics: Intel Arc 140V
    1 x HDMI 2.1
    1 x Thunderbolt 4
    2K Touch-Screen display, LED, IPS; 1920 x 1200 (Full HD+)
    USB Ports: 1 x USB-C 3.1, 2 x USB-A 3.1
    Wi-Fi 6E

    DELL
    Model:I7591-7483BLK-PUS 2-in-1 (7000 Series)
    purchased new 12/3/2019,
    15.6 inch 2-IN-1;
    4K Ultra HD Touch-Screen, 3840 x 2160,
    Intel Core i7 10510U CPU 1.80GHz,
    16GB RAM DDR4 SDRAM 2400 megahert (2 slots),
    dedicated graphics Nvidia GeForce MX250 2 GB Graphics,
    PCIe 512GB Intel SSD + 32GB Optane Memory (Intel Optane Memory H10 with solid-state storage),
    wireless-AX & Bluetooth
    Battery: 68wh, Type 4VGMP 4 cell
So you would recommend everyone to use your script to check and maintain their recovery partition even when their system is running at top notch, though they don't use, and have not ever used, the partition? I'd run it on my spare laptop but don't want to bork it. But I suppose running a Restore with Macrium or Hasleo would sort things out if something did go South.
Yes, obviously I certainly would recommend it! My script only does work once, then even if you run via scheduled task on a monthly basis and nothing changed, the script will take the fast exit path! The script is bound by four rules:
  1. 1. Never break Windows RE.
  2. 2. Never leave a machine without a working recovery route — to the extent the machine, its OS, and its storage stack allow.
  3. 3. Minimize the reagentc /disable → reagentc /enable window.
  4. 4. Do no work unless needed. When work is needed, prepare everything before touching anything.
 

My Computer My Computer

At a glance

Windows 11Intel® Core™ i5-11400Samsung 16GB DDR4 3200MHzNvidia GeForce GTX 1660 SUPER
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Custom Built
CPU
Intel® Core™ i5-11400
Motherboard
ASUS PRIME H510M-D
Memory
Samsung 16GB DDR4 3200MHz
Graphics Card(s)
Nvidia GeForce GTX 1660 SUPER
Sound Card
Onboard
Monitor(s) Displays
Samsung 24"
Screen Resolution
1920 * 1080
Goodnight; I'll be back tomorrow UK time.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 26H2 26300.9550AMD Ryzen 7 5825U with Radeon Graphics16GB
    OS
    Windows 11 Pro 26H2 26300.9550
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Motherboard
    BIOS CT_BI_AMI_LX15PRO_AB8139_A-004
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot SecureAnywhere Complete beta
  • At a glance

    Windows 11 Pro 23H2 22631.2506Atom N450 1.66GHz2GB
    Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
  • Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8894
    CPU Pentium Silver N6000
    RAM 4GB
    BIOS v1.17
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
@ArthurDurand


It matters not if your script trashes my system, as I have a Macrium Reflect disk image. Do your worst!
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 26H2 26300.9550AMD Ryzen 7 5825U with Radeon Graphics16GB
    OS
    Windows 11 Pro 26H2 26300.9550
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Motherboard
    BIOS CT_BI_AMI_LX15PRO_AB8139_A-004
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot SecureAnywhere Complete beta
  • At a glance

    Windows 11 Pro 23H2 22631.2506Atom N450 1.66GHz2GB
    Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
  • Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8894
    CPU Pentium Silver N6000
    RAM 4GB
    BIOS v1.17
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
There's a reason for the script not elevating itself! If run without elevation it does a dry run! It's part of the design philosophy with safety and security in mind!
This is a major problem for those who use Terminal, and elevated PowerShell is their default profile.

It will not do a "dry run", it will execute as live.

So, it is not safe.
 

My Computer My Computer

At a glance

Windows 11 Pro 26H2
OS
Windows 11 Pro 26H2
Computer type
Laptop
Manufacturer/Model
Toshiba
Antivirus
Defender
This is a major problem for those who use Terminal, and elevated PowerShell is their default profile.

It will not do a "dry run", it will execute as live.

So, it is not safe.
I get that, but look, I played my part! I documented my project extremely well with warnings and cautions! Besides, running any of my scripts in an elevated prompt is actually safe! Safety is everyone's responsibility, that is why even if you run it elevated you can add the -DryRun argument!
 

My Computer My Computer

At a glance

Windows 11Intel® Core™ i5-11400Samsung 16GB DDR4 3200MHzNvidia GeForce GTX 1660 SUPER
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Custom Built
CPU
Intel® Core™ i5-11400
Motherboard
ASUS PRIME H510M-D
Memory
Samsung 16GB DDR4 3200MHz
Graphics Card(s)
Nvidia GeForce GTX 1660 SUPER
Sound Card
Onboard
Monitor(s) Displays
Samsung 24"
Screen Resolution
1920 * 1080
I get that, but look, I played my part!

You don't understand your user base...

As @garlin said, folks here are not IT Admins.

Besides, running any of my scripts in an elevated prompt is actually safe!

That clearly is not true if the user expects a "dry run", but opens Terminal using a default elevated PowerShell profile.

Safety is everyone's responsibility, that is why even if you run it elevated you can add the -DryRun argument!

It's your responsibility to close holes in your design, so your stuff does no harm.
 

My Computer My Computer

At a glance

Windows 11 Pro 26H2
OS
Windows 11 Pro 26H2
Computer type
Laptop
Manufacturer/Model
Toshiba
Antivirus
Defender
You don't understand your user base...

As @garlin said, folks here are not IT Admins.



That clearly is not true if the user expects a "dry run", but opens Terminal using a default elevated PowerShell profile.



It's your responsibility to close holes in your design, so your stuff does no harm.
My script does what it says it does, nothing more! I have made this script as safe as I can make it, this script is supposed to run unattended without user interaction, so I don't know what your problem is? This script is safe to run; it will ensure that you have an adequately sized recovery partition with Windows RE registered, and at the very least it will do nothing! This script will not harm any system in any way!
 

My Computer My Computer

At a glance

Windows 11Intel® Core™ i5-11400Samsung 16GB DDR4 3200MHzNvidia GeForce GTX 1660 SUPER
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Custom Built
CPU
Intel® Core™ i5-11400
Motherboard
ASUS PRIME H510M-D
Memory
Samsung 16GB DDR4 3200MHz
Graphics Card(s)
Nvidia GeForce GTX 1660 SUPER
Sound Card
Onboard
Monitor(s) Displays
Samsung 24"
Screen Resolution
1920 * 1080
There's a reason for the script not elevating itself! If run without elevation it does a dry run! It's part of the design philosophy with safety and security in mind!
No mention of a -DryRun flag...

You have two methods to do a dry run...unelevated with no flag...or elevated with it.

There should be one method, and strictly enforced so the user never gets in the position of using a default elevated PowerShell prompt in Terminal that exectutes a live run instead.
 

My Computer My Computer

At a glance

Windows 11 Pro 26H2
OS
Windows 11 Pro 26H2
Computer type
Laptop
Manufacturer/Model
Toshiba
Antivirus
Defender
I have made this script as safe as I can make it
You haven't...

Re-read the posts, and hopefully at some point you'll understand what the problem is.
 

My Computer My Computer

At a glance

Windows 11 Pro 26H2
OS
Windows 11 Pro 26H2
Computer type
Laptop
Manufacturer/Model
Toshiba
Antivirus
Defender
You haven't...

Re-read the posts, and hopefully at some point you'll understand what the problem is.
Look, to me it isn't a problem, but I'll tell you what I can do, I can write a Windows Batch Script that will prompt the end user with enough warnings and cautions if they want to 1. run the test harness (with elevation, test harness only gathers information and test downloading extracting driver to a temporary location and cleans up after itself, it makes no system changes, test harness does these based on user choices), 2. Run the Windows RE Manager (Dry-Run, requires elevation), 3. Run the Windows RE Manager (requires elevation). The only reason why my command script will require elevation is so that some diagnostic commands during dry run don't throw warnings due to the lack of elevation. The user can then just download a Windows batch script, then double-click on it, if it doesn't have elevation it's fine, the script will prompt for elevation after the user made a selection and after properly warning the user what's about to happen, in other words double-click the batch file doesn't require elevation yet, it then presents the options to the user, after the user makes a selection the script first warns and cautions in red prompting the user to type a phrase to continue, anything else will exit immediately. After the user types the phrase exactly as they see it, the script will prompt for elevation and run the user's choice, what do you think of this plan? What I will then do is remove the commands from the quick start guide of my GitHub repo and explain that the batch file will do the work! I'll hide the more advanced stuff for sys admins and IT pros!?
 

My Computer My Computer

At a glance

Windows 11Intel® Core™ i5-11400Samsung 16GB DDR4 3200MHzNvidia GeForce GTX 1660 SUPER
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Custom Built
CPU
Intel® Core™ i5-11400
Motherboard
ASUS PRIME H510M-D
Memory
Samsung 16GB DDR4 3200MHz
Graphics Card(s)
Nvidia GeForce GTX 1660 SUPER
Sound Card
Onboard
Monitor(s) Displays
Samsung 24"
Screen Resolution
1920 * 1080
You haven't...

Re-read the posts, and hopefully at some point you'll understand what the problem is.
@Banjoman301

Why don't you improve the script there Banjoman301?
You seem to know what's needed.
By all means, show us what you can do because so far all I've read from you is overstated critiques and invalid accusations.
Plus you seem to know who your audience is, so it should be a piece of cake!
 

My Computers My Computers

  • At a glance

    All Branches but StableAMD Ryzen 7 7735HS 3200-4500 Mhz 8 cores x 232 GB DDR5Radeon Graphic / NVIDIA GeForce RTX 4060 8 GB...
    OS
    All Branches but Stable
    Computer type
    Laptop
    Manufacturer/Model
    Acer Nitro ANV15-51
    CPU
    AMD Ryzen 7 7735HS 3200-4500 Mhz 8 cores x 2
    Motherboard
    Sportage_RBH
    Memory
    32 GB DDR5
    Graphics Card(s)
    Radeon Graphic / NVIDIA GeForce RTX 4060 8 GB GDDR6
    Sound Card
    AMD/Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (15.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9 144Hz
    Hard Drives
    KINGSTON OM8SEP4512Q-AA 1TB
    Western Digital 256GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & 1GB Orange-fr
    Browser
    Edge Canary- Firefox Nightly-Chrome Dev-Chrome Dev
    Antivirus
    Windows Defender
  • At a glance

    Windows 11 BetaAMD A9-94208 GB of DDR4AMD Radeon R5
    Operating System
    Windows 11 Beta
    Computer type
    Laptop
    Manufacturer/Model
    Asus X751BP
    CPU
    AMD A9-9420
    Memory
    8 GB of DDR4
    Graphics card(s)
    AMD Radeon R5
    Screen Resolution
    1600x900
    Hard Drives
    Seagate 1 TB
Back
Top Bottom