During the installation or update of Windows 10 or Windows 11, you may encounter an error message that reads, “The computer restarted unexpectedly” or “Encountered an unexpected error”, causing the installation to fail to proceed. No matter how many times you restart your computer, the same error message pops up, and you can’t do anything else.
This error could happen in any Windows installation, including new OS installations, upgrades from older versions of Windows, or major Windows updates.
How to fix “The computer restarted unexpectedly” during Windows installation
Here are a few solutions you can try to get rid of “The computer restarted unexpectedly” loop error during Windows 10 or Windows 11 installation or update.
Solution 1: Use Registry Editor to edit setup value
When you encounter “The computer restarted unexpectedly” error during Windows 10 or Windows 11 installation, it means that the setup process has encountered an unexpected error and has been forced to shut down. This fix involves changing a registry value that controls the setup process behavior during installation. Specifically, we need to set a new value to the
setup.exe entry in the Windows registry editor.
To do this, follow these steps:
- On the error screen, press the
SHIFT + F10keys on your keyboard. This will bring up the command prompt.
- In the command prompt, type
regeditand hit the
- In registry editor, navigate to the following registry entry folder:
- While in the ChildCompletion folder, on the right pane, double-click on the
value data, change the value to
3(by default it should be
- Close the registry editor and restart your PC.
- Resume the Windows 10 or Windows 11 installation. If it cannot be resumed, restart the installation.
Solution 2: Reset Windows to factory defaults
If the above fix doesn’t work, you may want to reset your Windows to its factory default. Although it allows users to choose whether they want to keep their files during the reset, it’s best to figure out a way to backup your important files first before doing to reset. To perform the reset via Windows RE, follow these steps:
- To be able to reset Windows 10 or Windows 11, we need to boot into Windows recovery mode. To force boot your PC into Windows recovery, use the physical power button on your computer to force power on and off as soon as it starts loading the Windows logo. Repeat this for 3 times. When Windows detects too many failed startup attempts, it will boot into Windows Recovery Environment (RE).
- In Windows Recovery, navigate to Advanced options > Troubleshoot > Reset this PC.
- Follow the on-screen instructions to reset your Windows 10 or Windows 11 PC. This option will let you choose to keep or remove your personal files, and then reinstall Windows.
Solution 3: Create a new Windows installation disc
If the above workarounds don’t solve the “The computer restarted unexpectedly” loop error in Windows 10 or Windows 11, try to do a clean install by using a new Windows installation disc and boot from it. This fix requires at least some knowledge of changing the BIOS boot sequence and be able to run the bootable Windows installation media such as a USB. Here’s how to do it:
- On another PC that works, go to https://www.microsoft.com/software-download/windows10 or https://www.microsoft.com/en-us/software-download/windows11 and click on the “Download tool now” button. This tool allows you to create a Windows installation disc on an external drive such as a USB flash drive.
- Run the media creation tool on the working computer to create a Windows 10 or Windows 11 installation disc on an external drive such as a USB flash drive.
- When you have the drive ready with you, insert it into the computer that’s stuck in the loop error. Restart your PC and press the key that takes you to the BIOS setup (usually F2 or DEL). Change the boot order to boot from the USB drive first.
- Save changes and exit BIOS setup. Your computer will automatically boot from the USB drive and begin the installation process.
- During the installation process, you’ll be prompted to choose the installation type. Choose the “Custom” installation option, and then select the partition where you want to install Windows.
- Follow the on-screen instructions to complete the installation process. Once the installation is complete, your computer should restart and boot into the new installation of Windows 10 or Windows 11 without any issues.
Creating a new Windows installation disc is a bit more complicated than the previous solutions, but it’s an effective way to resolve issues where you are unable to boot into Windows due to a corrupted Windows installation.