Encountering “The computer restarted unexpectedly or encountered an unexpected error” during Windows 11 installation can leave your PC stuck in a restart loop. Windows starts the installation, restarts the computer, and then returns to the same error instead of completing the setup. This usually happens when the Windows installation process cannot continue correctly. Problems with the installation files, disk configuration, boot information, or interrupted setup can all cause the loop. In this guide, we’ll cover 8 practical ways to fix the “The computer restarted unexpectedly” error and complete the Windows 11 installation.
Why Windows 11 Gets Stuck in the Installation Loop
The error usually appears when Windows Setup cannot continue to the next stage of installation. The PC then restarts and returns to the same setup screen, creating a loop.
Common causes include:
- Corrupted or incomplete Windows installation files.
- A problem with the installation media or USB drive.
- An unexpected shutdown or interrupted installation.
- Incorrect setup or Registry configuration.
- Problems with the SSD or hard drive.
- A BIOS or hardware configuration issue.
The first few fixes below focus on getting Windows Setup out of the loop without starting the installation from scratch.
1. Edit the ChildCompletion Registry Value
One of the most common ways to break out of the “The computer restarted unexpectedly” installation loop is to correct a Windows Setup Registry value. This tells Windows Setup to continue the installation instead of restarting back into the same stage.
- On the error screen, press Shift + F10 to open Command Prompt.
- Type
regeditand press Enter. - Go to:
HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion - Double-click setup.exe in the right pane.
- Change Value data from
1to3. - Click OK and close Registry Editor.
- Close Command Prompt and restart the PC.

Windows Setup should continue instead of returning to the same error.
Quick Insight: This fix changes only the setup status value. It is worth trying first because it can resolve the loop without having to recreate the installation media or restart the installation.
2. Recreate the Windows 11 Installation USB
If the Windows installation files are incomplete or corrupted, Setup may fail during installation and restart repeatedly. This is especially possible when the USB was created incorrectly, or the ISO download was interrupted.
Create the installation media again using Microsoft’s official Media Creation Tool or a freshly downloaded Windows 11 ISO.
- On another working PC, download the latest Windows 11 installation media from Microsoft.
- Use a reliable USB drive with enough free space.
- Create the bootable installation USB again.
- Boot the affected PC from the newly created USB.
- Start the Windows 11 installation again.

If possible, use a different USB drive if the same loop continues.
Quick Insight: A fresh installation USB eliminates corrupted setup files as a possible cause. If the problem remains with new installation media, the issue is more likely related to the PC’s storage, configuration, or hardware.
3. Disconnect Unnecessary USB Devices
Connected USB devices can sometimes interfere with Windows Setup, especially when the installer is restarting and switching between installation stages. Removing unnecessary hardware helps reduce possible conflicts.
- Shut down the PC completely.
- Disconnect external hard drives, USB hubs, printers, card readers, and other nonessential USB devices.

- Keep only the Windows 11 installation USB, keyboard, and mouse connected.
- Start the PC and continue the installation.
- Reconnect your other devices after Windows 11 finishes installing.
If the installation was already running from a USB drive, make sure you don’t accidentally remove the installation USB during the process.
Quick Insight: Leave only essential hardware connected during Windows installation. A problematic external device can sometimes cause Setup to fail or restart unexpectedly.
4. Check the Installation Drive for Errors
If the SSD or hard drive has file-system errors or other storage problems, Windows Setup may fail while copying or configuring files and then restart unexpectedly.
You can check the installation drive from Command Prompt.
- On the error screen, press Shift + F10.
- Type:
chkdsk C: /f - Press Enter and let the scan finish.
- If Windows is being installed to a different drive letter in Setup, replace
C:with the correct drive letter. - Restart the PC and try the installation again.

You can use diskpart and list volume in Command Prompt to identify the correct Windows installation drive if you’re unsure about the drive letter.
Quick Insight: Drive letters can be different inside Windows Setup, so don’t assume the Windows partition is always C:. Make sure you’re checking the correct partition before running the command.
5. Reset BIOS or UEFI Settings to Default
Incorrect BIOS or UEFI settings can sometimes interfere with Windows installation, particularly after hardware changes or when storage settings have been modified.
Before changing anything, note any custom BIOS settings you need, such as boot order or virtualization settings.
- Restart the PC and enter the BIOS/UEFI setup. The key varies by manufacturer and is commonly F2, F10, F12, Delete, or Esc.
- Look for an option such as Load Setup Defaults, Load Optimized Defaults, or Restore Defaults.
- Load the default settings and save the changes.
- Make sure the PC is using UEFI boot mode when installing Windows 11.
- Set the Windows installation USB as the temporary boot device if necessary.
- Restart and try the Windows 11 installation again.

Avoid changing storage-controller settings such as AHCI/RAID unless you know the setting required by your existing installation or hardware.
Quick Insight: Resetting BIOS/UEFI can remove a configuration problem without changing your Windows installation files. If the loop started after a BIOS or hardware configuration change, this step is particularly relevant.
6. Start the Windows 11 Installation Again From Scratch
If the installation has already failed several times, the current Windows Setup files or installation state may be corrupted. Starting the installation again from a clean state can remove those problems.
Important: This method deletes the files and applications on the Windows installation drive. Back up anything you need before continuing.
- Boot from the Windows 11 installation USB.
- Start Windows Setup and choose Custom: Install Windows only.
- At the drive selection screen, identify the drive where Windows should be installed.
- Delete the existing partitions on that drive only, if you want a completely clean installation.
- Select the resulting Unallocated Space.
- Click Next and let Windows Setup create the required partitions automatically.
- Allow the installation to continue without interrupting the PC.
If the installation completes successfully, Windows should boot into the normal setup screen instead of returning to the restart loop.
Quick Insight: A clean installation removes the old Windows installation and its setup state, so it is useful when the existing installation is badly corrupted. Be certain you have selected the correct drive before deleting any partitions.
7. Check RAM and Other Hardware
If Windows 11 still restarts during a clean installation, faulty RAM or another hardware problem may be preventing Setup from completing successfully. Installation puts the system under sufficient load to expose memory or storage issues that may not be apparent during normal use.
Try these checks:
- Shut down the PC and disconnect the power.
- If you have multiple RAM sticks, remove one and try the installation again.
- If the problem continues, swap the RAM stick and test again.
- Check that the SSD or hard drive is firmly connected.
- Run your PC manufacturer’s built-in memory and hardware diagnostics, if available.
- If the PC has multiple storage drives, temporarily disconnect any drives not needed for the Windows installation.
If Windows installs successfully after removing a RAM stick or another drive, the disconnected hardware may need further testing.
Quick Insight: When the same Windows installation media fails repeatedly, testing RAM and storage helps determine whether the problem is with the PC rather than Windows Setup.
8. Make Sure the PC Boots From the Correct Drive
Sometimes Windows has already copied the installation files successfully, but the PC keeps booting from the Windows 11 USB instead of the newly installed drive. This can make Setup appear to restart repeatedly.
- Restart the PC.
- When the PC restarts for the first time, remove the Windows 11 installation USB when Windows Setup no longer needs it.
- Alternatively, open the boot menu and select the internal SSD or hard drive containing the Windows installation.
- Enter BIOS/UEFI and make sure Windows Boot Manager for the internal drive is ahead of the USB in the boot order.
- Save the changes and restart.
If Windows continues from the internal drive, the installation should move to the next setup stage instead of starting the installer again.
Quick Insight: A restart during Windows Setup is normal. The problem occurs when the PC repeatedly boots back into the installation media rather than continuing from the internal Windows drive.
Final Checks
After applying the fixes, restart the PC and check whether Windows 11 can complete the installation normally.
Before trying the installation again, make sure:
- The installation USB was created correctly and is not corrupted.
- Unnecessary USB devices are disconnected.
- The correct internal drive is selected for Windows installation.
- The PC is booting from Windows Boot Manager after the first restart.
- BIOS/UEFI settings are not preventing the installation from continuing.
- Your RAM and storage drive are working properly.
If the “The computer restarted unexpectedly” message keeps appearing even after a clean installation using freshly created Windows 11 media, the problem may be related to the SSD, RAM, motherboard, or another hardware component rather than Windows itself.
Quick Insight: The Registry fix is usually worth trying before wiping the installation. For a clean install that continues looping, focus on the installation media, boot order, storage, and hardware.
Frequently Asked Questions
The error can occur when Windows Setup cannot continue normally. Common causes include corrupted installation files, a failed setup process, incorrect Registry settings, storage problems, or hardware issues.
Start by pressing Shift + F10, opening Registry Editor, and changing the setup.exe value under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion from 1 to 3. If that doesn’t work, check the installation USB, disconnect unnecessary devices, and verify the boot configuration.
No. Changing the setup.exe value only changes the Windows Setup state. However, always be careful when editing the Registry and avoid changing unrelated entries.
Windows may repeatedly restart if Setup cannot complete a stage of installation or if the PC boots back into the installation USB instead of continuing from the internal drive. Corrupted media, storage errors, RAM problems, and BIOS/UEFI configuration can also cause repeated restarts.
Usually, once Windows has copied the required installation files and the PC begins restarting, it should continue from the internal drive. Removing the USB or selecting Windows Boot Manager can prevent the computer from starting the installation process over again.
