How to Resolve “The Computer Restarted Unexpectedly” Error When Installing Windows

In this article, we will delve into why this error happens and explore the best ways to troubleshoot and resolve it.

Posted by @Lucas December 17, 2024 Updated By @Lucas October 10, 2024

Installing Windows can sometimes lead to unexpected errors, and one of the most common and frustrating issues is seeing the error message, “The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed.” This issue can appear out of the blue, disrupting the installation process and leaving users confused about how to fix it. In this article, we will delve into why this error happens and explore the best ways to troubleshoot and resolve it.

Understanding the Problem

Why Does This Error Occur?

The error "The computer restarted unexpectedly" typically arises due to unexpected interruptions in the installation process. It can occur during a clean installation of Windows or while performing an upgrade from a previous version. The primary reasons for this error include:

  • Corrupted installation files
  • Faulty or incomplete hardware connections
  • Incorrect BIOS settings
  • Power interruptions
  • Outdated drivers

In some cases, this error can be a result of bad sectors on the hard drive or conflicts with peripherals like external hard drives or USB devices connected to the computer.

Common Scenarios Where This Error Happens

The error might occur in various situations, such as:

  • Installing or upgrading to a new version of Windows
  • Setting up a new virtual machine (VM) with Windows
  • Attempting to reinstall Windows after a system crash
  • Trying to install Windows on a custom-built PC with new components

Understanding where and how the error emerges is essential for applying the right fix.

Initial Troubleshooting Steps

Restarting the Installation Process

The simplest first step is to restart the installation. Sometimes, the error is a one-time glitch that a reboot can fix. After the computer restarts, the installation process might pick up from where it left off, completing without further issues.

Checking Hardware Connections

Before diving into advanced fixes, ensure that all hardware components are correctly connected. Loose or faulty cables, especially in custom-built PCs, can cause disruptions during installation. Check the following:

  • Hard drive connections
  • RAM seating
  • Power cables

If any component is loose or improperly connected, fix it and retry the installation.

Using the Registry Editor

Accessing the Registry Editor

If restarting doesn't help, accessing the Registry Editor is a common solution. Here’s how to access it during installation:

  1. On the error screen, press Shift + F10 to open the command prompt.
  2. In the command prompt, type regedit and hit Enter.

This will launch the Registry Editor, allowing you to modify certain values that may be causing the installation loop.

Editing the Registry to Bypass the Error

Once in the Registry Editor, follow these steps to modify the necessary values:

  1. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion.
  2. Find the key named setup.exe and double-click it.
  3. Change the value from 1 to 3, then click OK.
  4. Close the Registry Editor and restart your computer.

This tweak forces the installation to bypass the error, allowing it to continue.

Advanced Solutions

Booting into Safe Mode

If the Registry Editor solution doesn't work, try booting into Safe Mode. Safe Mode runs the system with minimal drivers and can help isolate the problem. To enter Safe Mode:

  1. Restart your PC.
  2. Press F8 repeatedly until the Advanced Boot Options screen appears.
  3. Select Safe Mode and press Enter.

From here, you can troubleshoot the issue further by inspecting any recently installed software or drivers that could be causing the error.

Performing a Clean Boot

A clean boot starts Windows with a minimal set of drivers and startup programs, which helps identify if background processes are interfering with the installation. Here’s how to perform a clean boot:

  1. Press Windows + R, type msconfig, and press Enter.
  2. In the System Configuration window, go to the Services tab.
  3. Check Hide all Microsoft services, then click Disable all.
  4. Go to the Startup tab and click Open Task Manager.
  5. Disable all startup items, then close Task Manager and restart your PC.

Retry the installation after the clean boot.

Resetting BIOS Settings

How to Access BIOS

The BIOS controls your system’s hardware configurations, and incorrect settings here can cause installation issues. To access BIOS:

  1. Restart your PC and press the key for BIOS access (usually F2, Del, or Esc).
  2. Once in the BIOS menu, use the arrow keys to navigate.

Resetting BIOS to Default Settings

If you’ve recently made changes to BIOS, resetting it to default may help resolve the issue:

  1. In the BIOS menu, look for an option like Load Default Settings or Reset to Default.
  2. Save and exit the BIOS, then retry the installation.

Verifying Boot Configuration

Checking Boot Order

Ensure your boot order is configured correctly. The installation media (USB or DVD) should be the first option:

  1. Go into BIOS and navigate to the Boot Order settings.
  2. Set the USB drive or DVD as the first boot device.
  3. Save changes and exit.

Changing Boot Options

Sometimes, disabling certain BIOS features like Secure Boot or Fast Boot can fix installation errors. Experiment with disabling these options and retrying the installation.

Manage your disk

AOMEI Partition Assistant is a professional hard disk partition manager which can solve most hard drive management problems encountered by users. The following are the reasons for why users are recommended to take it to have a try.

AOMEI Partition Assistant is a professional hard disk partition manager which can solve most hard drive management problems encountered by users. The following are the reasons for why users are recommended to take it to have a try.

This software can help you resize partition (extend and shrink, common partition or encrypted partition), move partition, merge partitions, split partition, migrate OS to SSD, copy partition/disk, create/delete/format partition, make bootable CD wizard, convert GPT/MBR disk, convert between NTFS and FAT32 file system, convert dynamic disk to basic, wipe disk and more.