This error usually appears during Windows installation and causes the setup to restart in a continuous loop. The message typically reads:

“The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed.”

Clicking OK simply restarts the system and brings you back to the same error. Follow the steps below to break the loop and continue the installation.


Why This Error Happens

This issue commonly occurs when:

  • A Windows image was cloned or deployed
  • The system was restored from an image backup
  • Setup fails to complete the “Finalize Settings” phase

This fix applies to Windows 10 and Windows 11 installations.


Step 1: Open Command Prompt During Setup

  1. When the error screen appears, hold the Shift key
  2. Press F10

This will open the Command Prompt window.


Step 2: Open the Registry Editor

  1. In Command Prompt, type: regedit
  2. Press Enter

The Registry Editor will open.


Step 3: Navigate to the Required Registry Key

In Registry Editor, navigate to the following path:

HKEY_LOCAL_MACHINE
 └── SYSTEM
     └── Setup
         └── Status
             └── ChildCompletion

Step 4: Modify the Setup.exe Value

  1. In the right panel, locate setup.exe
  2. Double-click setup.exe
  3. Change the Value data from 1 to 3
  4. Click OK
  5. Close Registry Editor

Step 5: Restart the Computer

  1. Close the Command Prompt
  2. Click OK on the error message
  3. The computer will restart automatically

This time, instead of returning to the error, Windows will move to the Finalize Settings phase.


What Happens Next

After rebooting:

  • You should see a purple or blue “Finalizing Settings” screen
  • Windows setup will continue normally
  • Installation will complete without looping back to the error

This confirms the fix worked.


Important Notes

  • This issue is not related to installing Windows from a DVD or USB
  • It mostly affects systems created from cloned drives or custom images
  • The registry change forces Windows Setup to advance to the next phase

Conclusion

If Windows setup gets stuck with “The computer restarted unexpectedly or encountered an unexpected error”, modifying the setup.exe registry value is the fastest and most reliable fix. Once changed, the installation continues normally and completes without further interruptions.

Leave a comment