The computer restarted unexpectedly or encountered an unexpected error

How To Fix "The computer restarted unexpectedly or encountered an unexpected error" Error 

You may have experienced 'The computer restarted unexpectedly or encountered an unexpected error.' This message also states the following: 'Windows installation cannot proceed. To install Windows, click "OK" to restart the computer, and then restart the installation'. In some cases, however, the computer restarts but you are still unable to proceed with the installation. This frustrating error affects many users but, fortunately, there are solutions.

This error usually occurs when users are trying to update or upgrade their current Windows operating system versions or using a recovery disk to restore Windows to its factory settings. In some cases, this creates an infinite loop. There is no single reason for this error and it is often difficult to ascertain the exact cause of the issue on different computers. There are, however, a number of possible fixes to the problem that will allow you to exit the endless restart loop. To resolve "The computer restarted unexpectedly or encountered an unexpected error", you might need to edit the Windows registry using Command Prompt commands, run the Automatic Repair tool, format the hard drive, and take other actions. Below, we outline various methods in a step-by-step guide.

The computer restarted unexpectedly or encountered an unexpected error

Table of Contents:

Edit Windows Registry

Windows Registry, usually referred to as just 'the registry', is a collection of databases of configuration settings in Microsoft Windows operating systems. It is used to store much of the information and settings for software programs, hardware devices, user preferences, operating system configurations, and much more. Many of the options exposed in the registry are not accessible elsewhere in Windows. To fix the "The computer restarted unexpectedly or encountered an unexpected error" problem you will need to change the ChildCompletion DWORD value data. To do so, press Shift + F10 keys on your keyboard. This should bring up the Command Prompt window. If this combination does not work, access Advanced Startup Options. Read this guide and use the "Interrupt Windows Boot Process" method, or use the Windows Installation CD/DVD/USB to access Command Prompt.

In Command Prompt, type "regedit" and press Enter. This will open Registry Editor.

edit windows registry step 1

Now follow this path: "HKEY_LOCAL_MACHINE/SYSTEM/Setup/Status/ChildCompletion". Select the "ChildCompletion" key and double-click "setup.exe" REG_DWORD, or right-click it and select "Modify..." from the contextual menu.

edit windows registry step 2

In the Edit DWORD (32-bit) Value window, set the value data to 3 and click "OK". Close the Registry editor, restart your computer and check if you still receive the "The computer restarted unexpectedly or encountered an unexpected error" error while trying to update, upgrade, or recover your Windows operating system.

edit windows registry step 3

[Back to Table of Contents]

Run Automatic/Startup Repair

Automatic/Startup Repair is a Windows diagnostics-based troubleshooting tool that is commonly used to repair the Windows operating system when an issue prevents startup. It is usually able to fix problems when there are damaged or missing system files. It might fix the "The computer restarted unexpectedly or encountered an unexpected error" issue, which prevents you from upgrading, recovering, or updating Windows. To launch Automatic/Startup Repair, you must use the Windows Installation Media on your DVD/USB or interrupt the boot process. You can find instructions in the previous method. Once you are in the Advanced Startup Window, click "Troubleshoot".

run automatic/startup repair step 1

Then click "Advanced options".

run automatic/startup repair step 2

Now click the "Startup Repair" option. Windows will start to diagnose your computer. See if this fixes the "The computer restarted unexpectedly or encountered an unexpected error" error.

run automatic/startup repair step 3

[Back to Table of Contents]

Format Your Hard Drive

Disk formatting is the process that prepares your data storage device (in this case, the hard drive/HDD) for initial use. It is considered to be the best way to erase all information stored on a hard disk drive (or other drive) before installing a clean version of the Windows operating system. If the two methods described above did not fix "The computer restarted unexpectedly or encountered an unexpected error", formatting your hard drive should do it. As mentioned before, however, this will erase everything from your hard drive. To format your hard drive, open Command Prompt as described in previous methods. In Command Prompt, type these commands and press Enter after each:

Diskpart
list volume
select volume 1 (change '1' to the number assigned to the drive you want to format)
format fs=ntfs quick label=test (you can change "test" to any label)
exit

format your hard drive

When the formatting is complete, restart the computer and try to install Windows again. Nevertheless, we hope that it was not necessary to format your hard drive (a rather drastic measure) and that the first method worked to resolve the "The computer restarted unexpectedly or encountered an unexpected error" issue. If you know of other solutions to this problem, not mentioned in our guide, please share them with us by leaving a comment in the section below.

[Back to Table of Contents]

Video Showing How To Fix "The computer restarted unexpectedly or encountered an unexpected error" Error:

[Back to Top]