Fix The computer restarted unexpectedly or encountered an unexpected error

If you are upgrading or installing Windows chances are you may be facing The computer restarted unexpectedly or encountered an unexpected error. No matter what you do, you can’t proceed with the installation, and you’re stuck in an endless loop. Whenever you restart your PC, you will again see this error, and that’s why it’s important to fix this issue.

The error is something like this:

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.

Fix The computer restarted unexpectedly or encountered an unexpected error

There is no particular cause as to why you are facing this issue but corrupted Registry, Windows files, damaged hard disk, outdated BIOS etc. are the reason. But this will give you a basic idea on how to troubleshooting these various causes, and that’s what exactly we are going to do.

Fix The computer restarted unexpectedly or encountered an unexpected error

If you’re not able to access the command prompt like shown below, then use this method instead.

Method 1: Chaing ChildCompletion setup.exe value in Registry Editor

1. On the same error screen, press Shift + F10 to open Command Prompt.

2. Type the following command and hit Enter: regedit

run regedit in command prompt shift + F10 | Fix The computer restarted unexpectedly or encountered an unexpected error

3. Now in the Registry Editor navigate to the following key:

Computer/HKEY_LOCAL_MACHINE/SYSTEM/Setup/Status/ChildCompletion

4. Next, click on ChildCompletion key and then on the right-hand side window look for setup.exe.

5. Double click on setup.exe and change its value from 1 to 3.

change the value of setup.exe under ChildCompletion from 1 to 3

6. Close Registry editor and command prompt window.

7. Now click OK on the error and your PC will restart. After the PC restart, your installation will continue.

Method 2: Check Hard Disk Cables

Sometimes you might get stuck in The computer restarted unexpectedly or encountered an unexpected error loop due to hard drive cable problems. Users reported that switching the cables that connect hard drive to the motherboard fixed the issue, so you might want to try that.

Method 3: Run Startup/Automatic Repair

1. Insert the Windows 10 bootable installation DVD and restart your PC.

2. When prompted to Press any key to boot from CD or DVD, press any key to continue.

Press any key to boot from CD or DVD

3. Select your language preferences, and click Next. Click Repair your computer in the bottom-left.

Repair your computer | Fix The computer restarted unexpectedly or encountered an unexpected error

4. On choose an option screen, click Troubleshoot.

Choose an option at windows 10 automatic startup repair

5. On Troubleshoot screen, click the Advanced option.

select advanced option from troubleshoot screen | Fix The computer restarted unexpectedly or encountered an unexpected error

6. On the Advanced options screen, click Automatic Repair or Startup Repair.

run automatic repair

7. Wait till the Windows Automatic/Startup Repairs complete.

8. Restart and you have successfully Fix The computer restarted unexpectedly or encountered an unexpected error, if not, continue.

Also Read: How to fix Automatic Repair couldn’t repair your PC.

Method 4: Format Hard Drive

Note: This method will remove all your files, folders and settings from your PC.

1. Again open the Command Prompt by pressing the Shift + F10 key on the error.

2. Now type the following command in cmd and hit Enter after each one:

Diskpart
list volume
select volume 1 (select the disk containing your Windows OS)
format fs=ntfs quick label=test

3. Type exit and press Enter to exit Command Prompt.

4. After you restart your computer problem with “The computer restarted unexpectedly” loop should be fixed.

5.But you have to install Windows again.

Recommended:

That’s it you have successfully Fix The computer restarted unexpectedly or encountered an unexpected error, but if you still have any queries regarding this guide, then please feel free to ask them in the comment’s section.

3 thoughts on “Fix The computer restarted unexpectedly or encountered an unexpected error”

  1. I did method number one and now my computer is stuck on 64% installing windows then turns off and turns on what do i do now i dint want to take it to a store if i can fix it on my own

  2. in my case mi computer not showes this path in registry

    Computer/HKEY_LOCAL_MACHINE/SYSTEM/Setup/Status/ChildCompletion

    in fact not show carpet satus

    so i can not do it nothing to resolve this error
    can any help me please

Leave a Comment

Your email address will not be published. Required fields are marked *