robot TL;DR:

The "computer restarted unexpectedly" Windows setup loop is caused by an interrupted configuration record and can typically be bypassed by pressing Shift + F10 on the error screen to open the Registry Editor and changing the setup.exe data value under the ChildCompletion key from 1 to 3.
    ● Secure your existing files using a bootable recovery drive before attempting further repairs, because fixing persistent loops often requires deleting failed partitions to unallocated space and permanently overwriting original data.
    ● If the loop occurs during a PC reset instead of a fresh installation, interrupt the startup process three times to access the Windows Recovery Environment to run System Restore or uninstall a recent update.
    ● If the installation halts at the exact same percentage repeatedly or survives a clean disk wipe, the failure stems from damaged media or faulty hardware, requiring you to rebuild the USB drive via the official Microsoft Media Creation Tool or run the Windows Memory Diagnostic.


Ask AI for a summary

"I tried factory resetting my computer and somewhere along the way i saw it had a message that read “The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed.” - Cosme_zee-

A Windows installation or reset reaches its configuration stage, then stops with an error offering only an OK button. Clicking it restarts the machine, and the same dialog returns.

The computer restarted unexpectedly loop is rarely a hardware fault. Setup records each stage as it completes, and an interrupted stage leaves that record inconsistent with what the installer is ready to run next. A registry workaround may bypass some cases, while this guide also covers safer available alternatives.

Try Recoverit to Perform Data Recovery

article-safe-itemSecurity Verified. 3,591,664 people have downloaded it.

In this article
    1. Fix 1. Use the ChildCompletion Registry Workaround With Caution
    2. Fix 2. Review Windows Setup Logs for the Failed Step
    3. Fix 3. Restart Installation From Official Windows Media
    4. Fix 4. Recreate the Installation USB
    5. Fix 5. Try a Different USB Port or USB Drive
    1. Fix 1. Open Windows Recovery Environment
    2. Fix 2. Run Startup Repair Only if Boot Files Are Damaged
    3. Fix 3. Uninstall a Recent Update if Reset Followed an Update Failure
    4. Fix 4. Use System Restore if a Restore Point Is Available
    5. Fix 5. Restart the Reset or Reinstall From Fresh Media

Part 1. What the “Computer Restarted Unexpectedly” Loop Means

The same message appears whether you are installing Windows fresh, resetting an existing copy, or running a factory recovery. Which of those you were doing changes where the failure sits and which fix resolves it, so it is worth establishing before anything else.

When the Error Appears During Windows Setup

The full text reads “The Computer Restarted Unexpectedly or Encountered an Unexpected Error: Windows installation cannot proceed. To install Windows, click OK to restart the computer, and then restart the installation." Following that instruction is what produces the loop.

It arrives after the first restart, once files are copied and Setup begins configuring the system. That timing narrows things down considerably. File copying is completed, but the installation media, storage drive, drivers, or hardware may cause failures during the configuration stage that follows.

Why Windows Setup Enters a Restart Loop

That progress record lives in the registry, under a key Setup writes to as each stage finishes. Power loss, a forced reset, or a stage that fails partway all leave it out of step with what the installer is ready to run.

Windows then restarts to recover, reads the same inconsistent record, and displays the same error. Nothing in that sequence alters the record itself, which is why the installation cannot complete until the value is corrected by hand.

Fresh Installation vs. Reset This PC vs. Factory Recovery

The same message appears across 3 different operations, and the fix differs slightly for each.

Operation What It Runs Where the Loop Starts Go To
Fresh Installation Setup from USB or DVD After the first restart Part 4
Reset This PC Windows own recovery image During the configuration stage Part 5
Factory Recovery The manufacturer's partition Anywhere in the process Part 5, then Part 6

A fresh installation gives you the most options, since the media is external and replaceable. Factory recovery gives you the fewest and rarely offers any way to skip a failed stage.

First Decision: Is There Data on the Drive That Still Matters?

Answer this before running any fix. A fresh installation onto a disk you already backed up leaves you free to delete partitions immediately.

If the drive still holds a previous Windows installation, documents, or anything you have not copied elsewhere, treat Part 3 as compulsory rather than optional. Several fixes below remove partitions permanently.

Part 2. Quick Checks Before Advanced Fixes

When the computer restarted unexpectedly, these risk-free checks help eliminate common causes before you try more advanced fixes:

Check What to Look For Recommended Action
Connected Devices External drives, card readers, or docks still attached Disconnect all but keyboard, mouse, and install media
Power Supply A laptop on battery, or a shared power strip Keep the charger connected for the whole process
Sleep Settings Firmware permitting sleep or hibernation mid-install Disable both before starting Setup again
Target Drive Several disks present, or a USB stick attached Match the disk number and capacity inside Setup
Installation Mode An in-place upgrade selected instead of clean Choose clean install where your data is backed up
Installation Media The loop halts at the same percentage each time Rebuild the USB from an official Microsoft image

This detail is important because Windows Setup numbers disks from zero. Therefore, the internal drive may not appear as Drive 0 when a USB stick is connected. Selecting the wrong disk means repeating the process. If the installation media seems unreliable, rebuild it with Microsoft’s official Media Creation Tool instead of reusing an older USB.

Part 3. Recover Files Before Reinstalling Windows

When the computer restarted unexpectedly, Windows Setup can become trapped in a loop that checks cannot resolve. The system keeps reading the incomplete installation record, so every reboot returns to the error screen instead of continuing. Even after the cause is removed, the loop remains until that damaged record is corrected. Before deleting partitions or reinstalling Windows, protect files still stored on the drive.

Recovering data first prevents permanent loss when later repairs overwrite existing partitions. Recoverit offers a solution when Windows no longer starts. Its bootable recovery media runs from a USB drive and scans the inaccessible disk outside Windows. You can then copy important files to a safe location before continuing with advanced fixes or a clean installation.

Key Features

  • Bootable USB Recovery: Creates a bootable USB drive to access and recover files from a crashed or unbootable Windows computer.
  • Recover Files From Crashed PCs: Recovers documents, photos, videos, emails, and other files from Windows systems that cannot boot normally.
  • No Windows Installation Needed: Retrieves files through bootable recovery media without requiring Windows to start on the affected computer.

Important Note: The tool deals with your data and nothing else. It cannot correct the registry value behind the loop, finish a stalled installation, or bring back partitions once Setup has written over them.

How to Copy Your Files Off the Stuck Machine

The recovery process below shows how to use Recoverit's bootable media to copy your files before attempting any repair that could overwrite them:

Step 1. Start the Crashed Computer Recovery

Open Recoverit > Choose “Other Tools” > Select “System Crashed Computer” > Press the “Start” button.

access system crashed recover recoverit

Step 2. Create a Bootable Drive

Insert a USB drive > Select it > Click “Create” > Boot the stuck computer from USB.

create new bootable usb recoverit

Step 3. Save the Recovered Files

Choose “Data Recovery” > Scan the target drive > Select files > Save externally to another device.

recover targeted files from drive

Why Recovery After a Clean Install Is Not Guaranteed

When the computer restarted unexpectedly, a clean installation may seem like the quickest solution. However, it writes new system files across the volume and creates fresh partition structures. Any overwritten regions now contain new data, making the previous files difficult or impossible to reconstruct.

Solid-state drives reduce the recovery window even further. TRIM marks unused blocks as discardable, and the SSD may erase them unpredictably after formatting or use.

Wondershare Recoverit – Leader in Data Recovery
  • Recovers data from 1000+ file formats and 1 million devices, including Camera, CFexpress, SD, micro SD, Transcend SD, HDDs, SSDs, Win/Mac, Linux/NAS etc.
  • Handles 10000+ data loss scenarios, such as deletion, emptied trash, formatting, virus attacks, etc.
  • Recovers lost or deleted files like words, photos, videos, music, emails, and other 1000+ file types effectively, safely and completely.
  • Recovers full HD, Ultra HD, 4K, and 8K videos without corruption.

Part 4. Fix the Setup Restart Loop

With your data secured, this part addresses the loop itself. The registry fix resolves the majority of cases in under 2 minutes.

Fix 1. Use the ChildCompletion Registry Workaround With Caution

When the computer restarts unexpectedly, Setup may keep reading an incomplete configuration record. Changing the ChildCompletion setup.exe value to 3 may bypass the loop, but does not repair its underlying cause. Leave the error dialog open instead of clicking “OK,” because dismissing it restarts the computer before you can apply the change. Follow the steps below to use the ChildCompletion workaround safely.

Step 1. Press “Shift + F10” on the error screen to open Command Prompt. Some laptops need “Shift + Fn + F10” instead. Next, type “regedit” and press “Enter.”

open registry from command prompt

Step 2. Then navigate to “HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion.”

navigate to childcompletion registry key

Step 3. Double-click the "setup.exe" value in the right pane. Change its data from “1” to “3” and select “OK.”

change setup exe value to 3

Note: If the machine has no operating system at all, this key will not exist. Open regedit, select HKEY_LOCAL_MACHINE, choose "File > Load Hive," open SYSTEM from the drive's Windows\System32\config folder, and name it. Edit “ChildCompletion” inside that hive, unload it, then run “wpeutil reboot.”

Fix 2. Review Windows Setup Logs for the Failed Step

Where the registry change does not help, the logs name the stage that failed. Microsoft documents where Setup writes them at each phase.

Log Location Covers
X:\Windows\Panther The phase running from installation media
C:\$WINDOWS.~BT\Sources\Panther Setup actions before disk configuration
C:\$WINDOWS.~BT\Sources\Rollback What happened when Setup rolled back
%WINDIR%\Panther Configuration after the disk was prepared
C:\$SysReset\Logs Reset this PC failures specifically

Instructions. Open “setuperr.log” first, since it lists only errors and is usually short. Use “notepad X:\Windows\Panther\setuperr.log” from the same Command Prompt.

open windows setup error log

Fix 3. Restart Installation From Official Windows Media

Third-party download sites may distribute modified images containing altered install.wim or install.esd files. Such builds can remove components that Windows Setup still needs to configure. A loop stopping at the same percentage during every attempt often points to damaged installation media rather than the computer. Follow the instructions below to restart from official media:

Instructions. Open Microsoft's Media Creation Tool > Select “ISO file” > Click “Next,” and save the Windows IS. Recreate the installation media from the official image before restarting Setup.

download windows iso installation media

Fix 4. Recreate the Installation USB

A stick that worked previously can develop bad sectors or retain an incomplete write from its last use. Choose a full format over a quick one, because the quick option skips any test of the flash underneath. Create the installer again with Microsoft’s tool, then safely eject it after the process finishes completely successfully.

choose usb flash drive installation media

Fix 5. Try a Different USB Port or USB Drive

Connect the installation media to a rear motherboard port instead of a hub or front-panel socket. Try a USB 2.0 port as well, because some firmware handles it more reliably during setup. If the “computer restarted unexpectedly” loop continues, recreate the installer on another USB drive, since failing flash storage can interrupt installation without showing any clear visible warning signs.

boot from windows installation usb

Part 5. Fix the Error During Reset This PC

Reset failures behave differently from fresh installations, because the recovery image sits on the same disk that is being rewritten.

Fix 1. Open Windows Recovery Environment

Most fixes here need Windows Recovery Environment. Interrupt startup twice with the power button, and the third attempt normally loads it automatically. Follow the instructions below to open WinRE:

Instructions. Where that fails, start the PC from installation media and pick “Repair Your PC” instead of Install now and wait for “Automatic Repair.”

windows recovery environment repair pc

Fix 2. Run Startup Repair Only if Boot Files Are Damaged

Startup Repair helps when the reset left the boot configuration incomplete, not when the loop is a stalled configuration stage. Try it once and move on quickly if it reports nothing found.

Instructions. Choose “Troubleshoot > Advanced options > Startup Repair,” pick your installation, and wait for the diagnostic to finish.

startup repair advanced options

Fix 3. Uninstall a Recent Update if Reset Followed an Update Failure

A reset triggered after a failed update inherits whatever the update broke. Removing that update first gives the reset a stable base to work from. To uninstall a recent update via WinRe, follow the steps below:

Instructions. Open “Troubleshoot > Advanced options > Uninstall Updates” and remove the most recent quality update first, leaving feature updates as a second attempt.

uninstall latest quality update

Fix 4. Use System Restore if a Restore Point Is Available

A restore point predating the failed reset reverses system changes while leaving personal folders intact. Follow the instructions below to use System Restore:

Instructions. Pick “Troubleshoot > Advanced options > System Restore” and select a snapshot from before the trouble started. Tick the box showing additional restore points, since the first screen conceals older entries.

system restore from advanced options

Fix 5. Restart the Reset or Reinstall From Fresh Media

The image reset may have been damaged by whatever caused the original problem. Installing from a freshly downloaded ISO sidesteps it altogether, which often succeeds where repeated resets fail. Follow the given steps to restart the Reset or Reinstall from fresh media:

Instructions. Download a fresh Windows ISO from Microsoft, create new installation media, boot from it, and choose “Install Windows” instead of running “Repair my PC” again.

install windows from fresh media

Part 6. Last-Resort Reinstall and Hardware Checks

When the computer restarts unexpectedly persists after registry repairs, log reviews, and fresh media, rebuild the disk and inspect the underlying hardware.

Delete Failed Installation Partitions Only After Recovery

Confirm your files are copied and readable before this step, since nothing here can be undone. On Setup's partition screen, choose “Delete Partition” belonging to the target disk until only unallocated space remains.

delete failed installation partitions

Install Windows on Unallocated Space

Once the disk becomes unallocated, Windows Setup can rebuild every required partition automatically, reducing sizing errors and preventing separate installation problems later during the process. Follow the instructions below to install Windows on unallocated space:

Instructions. Select the “Unallocated Space” on the correct disk and click “Next.” Let Windows Setup create the recovery, EFI, MSR, and primary partitions automatically.

install windows on unallocated space

Check the HDD, SSD, and RAM if Setup Keeps Failing

A loop that survives a completely clean disk points at hardware. Memory is the first thing to test, because configuration writes heavily and a faulty module corrupts what Setup records. These steps guide you to check the HDD, SSD, and RAM if Setup keeps failing

Step 1. Launch your PC maker's built-in diagnostic, usually available by pressing F12, F2, or Esc at power-on.

press f12 on keyboard

Step 2. Run “Windows Memory Diagnostic” and select “Restart now and check for problems.”

windows setup hardware diagnostics

Replace Failing Hardware Before Reinstalling

A drive reporting SMART warnings or bad sectors will reproduce the same failure after installation. Fit the replacement first, then install it onto sound hardware.

Conclusion

To conclude, the “computer restarted unexpectedly” loop usually results from a Windows Setup or installation problem rather than a hardware failure. The ChildCompletion registry workaround may resolve some cases, while setup logs and fresh installation media help diagnose persistent issues. Before deleting partitions or reinstalling Windows, recover important files with Recoverit to avoid permanent data loss.

FAQ

  • Why does clicking OK not fix the loop?
    Clicking OK only restarts the machine, which reads the same inconsistent progress record again. The record has to change before the installation can advance.
  • Where exactly is the ChildCompletion registry key?
    It sits at “HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion.” ChildCompletion is one word, and the value you edit inside it is named setup.exe.
  • Will the registry fix delete my files?
    No, it changes a single progress value and touches nothing else. The risk to your files comes from the partition deletion in Part 6, not from this edit.
  • Can Recoverit stop the restart loop?
    No, it recovers files from a machine that will not finish installing. Breaking the loop still needs the registry change or a fresh installation.
Kelly Sherawat
Kelly Sherawat Aug 13, 26
Share article:
Get Recoverit Get Recoverit