Windows  ·  critical  ·  Recovery, imaging & repair

"Automatic Repair couldn't repair your PC" — the repair loop

Windows failed to boot, ran its own repair, that also failed, and it now repeats the cycle. The log it leaves behind usually names the cause.

What you see

"Preparing Automatic Repair", then "Diagnosing your PC", then the failure screen — on every boot. Startup Repair from the menu makes no difference.

What is actually wrong

A damaged boot configuration, a filesystem error on the system volume, a driver that fails during boot, or a pending update that cannot complete. The repair tool handles almost none of these on its own.

Codes and articles

Automatic Repair couldn't repair your PCsrttrail.txt0xc0000034Preparing Automatic Repair0xc000000e

Fixes (4)

Read the repair log before doing anything else
WinRE Command Prompt20 minuteslow riskreversible

Always first. It costs twenty minutes and frequently names the exact file or driver.

  1. From the failure screen, choose Advanced options → Troubleshoot → Advanced options → Command Prompt.

  2. Find the Windows volume — inside WinRE it is usually not C:.

    Command Prompt
    diskpartlist volumeexit
  3. Open the log the repair tool writes.

    Command Prompt
    notepad D:\Windows\System32\LogFiles\Srt\SrtTrail.txt

    The last few lines name the root cause — a specific driver file, a corrupt registry hive, or a boot configuration problem. Working without it means guessing between four different repairs.

  4. Also check the setup log if an update was involved.

    Command Prompt
    notepad D:\Windows\Logs\CBS\CBS.log
  5. Match what you find to the specific fix below rather than running all of them.

Confirm it workedYou have a named cause to work from.
If you need to undo itNothing was changed.
Roll back the update that cannot complete
WinRE Command Prompt45 minutesmedium riskreversible

It began after an update.

  1. Identify the Windows volume as above, then list what is pending.

    Command Prompt
    DISM /Image:D:\ /Get-Packages /Format:Table | findstr /i "Pending"
  2. Revert the pending transaction.

    Command Prompt
    DISM /Image:D:\ /Cleanup-Image /RevertPendingActions
  3. Remove the specific update if one is named and the revert alone does not clear it.

    Command Prompt
    DISM /Image:D:\ /Remove-Package /PackageName:Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1234.1.5

    Naming the package removes only that update. The alternative — a system restore or a reset — undoes far more than the one thing that is broken.

  4. Rename the pending operations file so the servicing stack does not retry on boot.

    Command Prompt
    ren D:\Windows\WinSxS\pending.xml pending.old
  5. Restart. The first boot will be slow.

Confirm it workedWindows reaches the sign-in screen, and the component store is consistent once in.
PowerShell
DISM /Online /Cleanup-Image /ScanHealth
If you need to undo itRename pending.old back to pending.xml if the revert made things worse.
Repair the filesystem and the boot record
WinRE Command Prompt1–2 hoursmedium riskreversible

After a power loss, or when the log names a disk or boot configuration error.

  1. Check the disk first. A filesystem error makes every later repair fail confusingly.

    Command Prompt
    chkdsk D: /f /r
  2. Rebuild the boot configuration. Do this in order — each step depends on the previous one.

    Command Prompt
    bootrec /fixmbrbootrec /fixbootbootrec /scanosbootrec /rebuildbcd
  3. On a UEFI machine, bootrec /fixboot commonly returns Access is denied. Repair the EFI partition instead.

    Command Prompt
    diskpartlist disksel disk 0list volsel vol 1assign letter=S:exitbcdboot D:\Windows /s S: /f UEFI

    bcdboot writes a fresh boot store to the EFI system partition from the Windows install itself. It is the reliable UEFI equivalent of the whole bootrec sequence and it is what to reach for when fixboot is denied.

  4. Restart and remove the assigned letter afterwards if you assigned one.

Confirm it workedThe machine boots to Windows without the repair screen.
Command Prompt
bcdedit /enum
If you need to undo itExport the boot configuration first with bcdedit /export, and restore with bcdedit /import.
Get past the driver that is failing
WinRE startup settings45 minutesmedium riskreversible

New hardware or a driver update preceded it.

  1. From the recovery menu choose Startup Settings → Restart, then Safe Mode.

  2. If Safe Mode boots, the fault is a driver or service that does not load there. Remove the recently installed driver.

    Command Prompt
    pnputil /enum-drivers
  3. If Safe Mode does not boot either, disable driver signature enforcement from the same menu and try again — that gets a machine in when a driver has been corrupted rather than merely misbehaving.

  4. From WinRE, the offending driver can be removed offline once identified.

    Command Prompt
    DISM /Image:D:\ /Get-Drivers /Format:TableDISM /Image:D:\ /Remove-Driver /Driver:oem12.inf

    This works even when no mode boots. The driver package is removed from the offline image, so the next boot never loads it.

  5. Restart normally and reinstall a correct version of the driver.

Confirm it workedThe machine boots normally and Device Manager shows the device with a working driver.
If you need to undo itThe removed driver package can be reinstalled from the vendor's download.

Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.