Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Fix: The Computer Restarted Unexpectedly or Encountered an Unexpected Error on Windows

May 16, 2024 Windows 10Windows 11

Fix: The Computer Restarted Unexpectedly or Encountered an Unexpected Error on Windows

In some cases, when you perform a clean installation of Windows, update a build, or create a reference image using sysprep, the Windows Installer fails with an error: The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. When you click OK, the computer restarts, and when you re-run the Windows Setup, you see the same error window repeatedly in a loop… If your computer keeps restarting unexpectedly, what can you do to proceed with Windows installation?

The error may occur during one of the stages of installing or updating Windows, and looks 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.

error loop: The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed

Neither clicking the OK button nor restarting the Windows installation wizard helps when the “Computer restarted unexpectedly” error occurs. The error goes into a never-ending loop.

To fix the problem, you don’t have to close the error message or click OK, and follow these steps:

  1. Press Shift + F10 right on the screen with the error. On some laptops, you may need to use a different keyboard shortcut: Shift+Fn+F10;
  2. This will open a command prompt window. From here, you need to open the registry editor by running the regedit command;
    run regedit in winpe
  3. Got to the registry key HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion
  4. In the right pane, locate the setup.exe parameter. Its value is likely to be 1. Change it to 3 and save the changes;
    Note. This value forces the Windows Installer to proceed to the next stage of the operating system installation
    windows registry key ChildCompletion setup.exe
  5. Close the Registry Editor, and restart your computer by clicking OK in the error windows or using the command: shutdown -r -t 0 or wpeutil reboot

After the computer restart, the Windows installation (update) process should proceed normally.

windows 10 installation just a moment

The issue of Windows installation being interrupted by an unexpected restart can occur in Windows 10 and 11, as well as previous versions of Windows and Windows Server.

If the above method does not help you resume a normal Windows installation and fix the automatic restart problem, try the following solutions.

Issue: Your computer is restarting automatically and you don’t have enough time to make any changes to the registry.
Fix. The default behavior of Windows can cause your computer to restart automatically when a system failure or BSOD occurs.
  1. Boot your computer from any Windows installation media or a LiveCD;
  2. Press Shift + F10 on the first installation screen to open the command prompt;
  3. You need to know the drive letter assigned to your Windows volume;
  4. Run the commands:
    diskpart
    List vol
    In my example, the Windows is located on Volume 1 (according to partition size). No drive letter is currently assigned to this partition. Let’s assign the drive letter W manually:
    Assign letter=w:
    exit
    diskpart: assign drive letter to offline windows partition
  5. Run regedit and load the HKEY_LOCAL_MACHINE\SYSTEM registry hive from your offline Windows image;
  6. Select the HKEY_LOCAL_MACHINE in the Registry Editor and click the File -> Load Hive. Select the file W:\Windows\System32\Config\System regedit loading hklm system hive from offline file
  7. Set the hive name (mylocal). This will load your offline Windows image’s HKLM registry key into the registry editor;
  8. Go to the reg key HKEY_LOCAL_MACHINE\Mylocal\Setup\Status\ChildCompletion and change the value of the setup.exe parameter to 3  ChildCompletion setup.exe set to 3 to fix The Computer Restarted unexpectedly or encountered an unexpected error
  9. To save changes to the offline registry file, select File-> Unload Hiveregedit save change by unloading offline hive
  10. Switch to the WinPE command prompt and restart the computer using the command: wpeutil reboot
  11. The Windows installation will then continue normally.
Issue: Windows installation continues, but at 64% the computer automatically reboots and goes into a loop.

Windows installation stuck at 64% and goes into a reboot loop

Reason: The most common cause of the problem is a corrupted or modified Windows installation image (install.esd or wim file).

Solution: burn the original Windows installation media using the official Media Creation Tool or Rufus (How to create a bootable UEFI USB drive with Windows Setup).

Run a clean installation of Windows from a new bootable USB stick, and be sure to delete all partitions on the drive you want to install Windows on (if you have your data on the drive, copy it before removing the partitions). Continue to install Windows on the Unallocated space. Windows Installer will create all the necessary system partitions (read more about system EFI and MSR partitions in Windows).

clean windows installation to unallocated space

Also:

  • Check your local hard drive for errors: chkdsk W: /F /R
  • Disconnect all unused USB drives, LAN, and Wi-Fi network adapters from the computer (physically or in the BIOS/UEFI settings).
39 comments
24
Facebook Twitter Google + Pinterest
previous post
Installing Fonts in Windows Using GPO and PowerShell
next post
How to Change a User Password in a Remote Desktop (RDP) Session

Related Reading

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Remove ‘Your License isn’t Genuine’ Banner in MS...

April 21, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

39 comments

Joe Lockhart February 13, 2020 - 10:17 pm

This happened to me and I tried for days to fix it, help from HP, etc. etc. I was just about to give up and take my HP laptop to Best Buy when tried this. I searched for the exact phrase:
“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.”
This came up and it worked PERFECTLY! Thank You!!!

Reply
Aashid PS May 23, 2020 - 4:25 pm

Ty it woirked

Reply
John Rodgers June 28, 2020 - 12:50 am

Worked upgrading Server 2008 R2 to Server 2012 R2 DataCenter as well!

THANKS SO MUCH!

Reply
Ami August 2, 2020 - 3:38 pm

Wpeutil is not recognized as an internal or external command, operable program or batch file

Reply
ALFONSO August 6, 2020 - 9:59 pm

Worked like a charm! Installing Win 10 on Hyper-V

Reply
Joan August 9, 2020 - 10:34 am

My laptop keep shutting off before i can even finish editing registry. Pls help

Reply
Jan Michael Del Castillo February 7, 2021 - 11:52 pm

Thank you it worked! BTW the “wpeutil reboot” to restart the computer is not working so just click the “OK’ button on the error message to restart the computer.

Reply
agustin March 25, 2021 - 2:49 pm

not work for me , in fact not showes this path . noly show Setup but \Status\ChildCompletion not
any suggestion?

Reply
Dulaj May 27, 2021 - 8:16 pm

It worked. Really helpful
Thank you.❤

Reply
Vee September 12, 2021 - 12:12 pm

Didn’t work for me, tried for hours. Still have the message and the little dotts turning in a circle.
Don’t know what to do now. i have a computer i can’t use.

Reply
Anne Marie September 20, 2021 - 12:37 pm

It worked. THANK YOU.

Reply
Vladifsh May 3, 2022 - 5:03 am

Worked for me ! Thank you !

Reply
guy May 3, 2022 - 11:45 pm

worked

Reply
Mikael June 21, 2022 - 11:03 pm

this worked!!!! i did not believe it would work but I followed all steps and BAM! thanks so much man, information is so valuable.

Reply
Garrett June 26, 2022 - 11:51 pm

After going through 4 brand new units that would pop up with this error message, I was at a complete loss. That is, until I found your web page. One run and all was up and running, just as it had been.

Reply
Shonneaita Grays July 20, 2022 - 1:46 pm

Tried doing reset on my computer then a message saying The computer restarted unexpectedly cannot proceed. To install window , click OK to restart computer, and then restart the install. But the same thing keep happening. It say preparing but nothing happens and the message pops up again. How do I just get the damn thing to work again. It an Hp Pavilion

Reply
Denise Power October 17, 2022 - 11:47 am

I feel the same way. Thank you so much. This was the only thing that worked in 2 days of non stop trying to reboot.

Reply
Chasure November 18, 2022 - 2:30 am

I did this, which got rid of the error message. But now the blue windows update screen keeps showing up that says Windows Installing 64% and then restarts … so now I”m in a different kind of loop. Any suggestions?

Reply
Cl3arWorld_Kingz December 22, 2022 - 11:55 am

This worked like a charm thanks to you I saved my computer

Reply
abreu January 30, 2023 - 1:41 am

when I press shift + f10 or fn + shift + f10 my computer restarted repeated again so..how to resolve this?

Reply
Adam February 27, 2023 - 6:06 pm

Computer is now constantly resetting itself and I’m stuck. Please help

Reply
Briseida March 18, 2023 - 1:34 am

I usually don’t leave reviews but I’ve had a useless laptop for a year and really needed it again. I thought I was going to have to buy a new operating system but this worked!! I’m so excited and thank you so much for this.

Reply
Samuel Abebe May 29, 2023 - 6:19 am

It’s working for me. Thank you so much.

Reply
Helga Lehner September 28, 2023 - 8:01 am

Thank you so much, worked for me 🙂

Reply
Sameer October 30, 2023 - 8:10 pm

After open this dialogue box, my keyboard not working, please help me fix this

Reply
happy installer November 28, 2023 - 8:28 pm

Simple, and it works, when the ret of the internet had let me down

Reply
DMKK January 9, 2024 - 12:14 pm

I tried to install tiny10 on old hp laptop for dial boot but i get this error after trying to boot into tiny10
“The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. ”
and then it turns itself off and when i try to boot up it again it says this
“Windows Setup could not configure Windows to run on this computer’s hardware”

followed the steps on this article and was able to install tiny10

Reply
ريدان رائد May 12, 2024 - 6:05 pm

Thank you, brother. It worked. I am grateful to you

Reply
Santhanam s May 16, 2024 - 12:52 pm

I got the same problem
. and not able to find any solution from anyone.to day i have seen your website.. i will do as per your instructions and try to get good solution.I will reply after getting ready my laptop.Thank you

Reply
Santhanam s May 17, 2024 - 9:07 am

Sir after going through the above article finally I am able to clear the trouble error message. and able to install the OS again. I don’t know how to thank you. I was wondering what to do. I thought of buying new hard disk and usb os installed. with your guidance i am able to get free of mind will out spending a rupee. Thank you again.

Reply
gio pappa August 20, 2024 - 11:26 am

I tried several ways but yours One (1st method) worked! And I was trying to install win11. Thanks!!

Reply
Amine August 21, 2024 - 2:08 pm

Aidez moi svp
Quand j’essai d’appuyer sur shift+F10 sa ne marche pas, aussi shift+FN+F10 ne fonctionne pas.
Comment puis-je y procéder ?

Please help me
When I try to press shift+F10 it doesn't work, also shift+FN+F10 doesn't work.
How can I do this?

Reply
anh September 4, 2024 - 8:33 pm

does your current keyboard work well? if not, try buying a usb keyboard

Reply
Djibs November 4, 2024 - 5:23 am

Thank you for all

Reply
Djibs November 4, 2024 - 5:28 am

Tried for hours to solve this problem and when I m about give up I see your post from another person on a website The first method worked for me. Thank you !!!

Reply
Peter January 5, 2025 - 12:44 pm

This worked a charm, thanks!

Reply
Klejdi January 7, 2025 - 10:21 pm

Thank you a lot! I thought I had to follow the long process of installing from external drivers but the first method worked perfectly. Life saver!!

Reply
peter January 29, 2025 - 12:21 pm

yooooo thanks

Reply
tomkins January 30, 2025 - 12:01 pm

thanks working😋

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • Updating List of Trusted Root Certificates in Windows
  • Fix: Windows Cannot Connect to a Shared Printer
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top