To fix the computer restarted unexpectedly error during Windows installation, disconnect nonessential devices, retry Setup, and use fresh official installation media if the error returns. If an existing Windows installation survives, recovery tools or a reset may also help. The steps below use Windows 11 menus.
Choose the route that matches what you can still open: a working desktop, recovery tools, or only the installer. Back up recoverable files before resetting or reinstalling, because some options remove your data.
The short version
- Start simple: Disconnect unnecessary accessories while keeping the keyboard, mouse, display and installation USB connected.
- Replace the installer: Create fresh official installation media on a working computer.
- Use the right recovery route: Desktop repairs need a working Windows installation, while recovery tools can help when Windows cannot boot.
- Protect your files: A clean installation destroys data on the selected Windows disk.
| Option | When to use it | Main limitation |
|---|---|---|
| Disconnect accessories | Before retrying Setup | Keep essential installation devices connected |
| Fresh x64 installation media | You need a new installer for an x64 PC | Creating it erases the selected USB drive |
| Arm64 installation media | You have a compatible Arm-based PC | Follow device-specific driver and media instructions |
| Recovery from installation media | The installed copy cannot boot | Requires a bootable installer |
| Recovery from the desktop or power menu | You can still access those controls | Controls may be unavailable in the error dialog |
| Startup Repair | An existing installation has boot corruption | Not a specific cure for the setup loop |
| BitLocker key retrieval | Recovery requests your key | Enables access without repairing Windows |
| Windows and driver updates | The desktop works after a failed upgrade | Requires a usable existing installation |
| DISM and System File Checker | You can repair system files before retrying an upgrade | The commands below target running Windows |
| Reinstallation through Windows Update | You have a working desktop and the required updates | Management policies can hide the option |
| In-place repair installation | You have a working desktop and matching media | Must start from inside Windows to preserve apps |
| Reset this PC | The reset environment works | Removes apps and settings |
| Clean installation | You are ready to erase and reinstall | Destroys data on the target disk |
| Dell hardware diagnostics | A supported Dell needs hardware checks | SupportAssist OS Recovery excludes Qualcomm models |
| Dell software repair | A supported Dell can open its recovery tools | Depends on model and recovery support |
| Dell BIOSConnect | Local recovery is unavailable on a supported Dell | Requires model support and a network connection |
Disconnect unnecessary devices and retry
Disconnect printers, scanners, external storage and other nonessential accessories. Undock a docked laptop, but retain the keyboard, mouse, display and installation USB needed to run Setup. Retry installation with those essentials connected.
If the same error returns, move to fresh installation media.
Create fresh Windows installation media
On a working computer, open the official Windows 11 download page. Under Create Windows 11 Installation Media, select Download Now, run the tool as administrator, then select Accept. This tool creates Windows 11 x64 installation media.
Creating the installer erases the selected USB drive. Choose Create installation media for another PC, select Next, then choose the language and edition. Select USB flash drive and an empty drive with at least 8 GB of capacity.
For an Arm-based PC, use the official Windows 11 Arm64 download page and follow its driver and media-preparation instructions. The x64 Media Creation Tool does not create Arm64 media. Use the manufacturer's recovery image when your model requires it.
Boot the affected computer from the completed installer using its manufacturer's boot menu. You can use that media to recover Windows using a USB drive or start a fresh installation. If you need to preserve an existing installation, open its recovery tools before proceeding to a clean installation.
Open recovery tools and try Startup Repair
After booting current Windows 11 installation media, choose the language and keyboard settings. Select Repair my PC, then select Next to access the Windows Recovery Environment. This route is useful when the installed copy of Windows cannot boot.
On Windows 11 with an accessible desktop, open Settings > System > Recovery and select Restart now beside Advanced startup. Alternatively, hold Shift while selecting Power > Restart. These controls may be unavailable inside the installation-error dialog, so use installation media in that situation.
For an existing installation with accompanying boot problems, use Startup Repair for boot problems by selecting Troubleshoot > Advanced options > Startup Repair > Restart. Supply the BitLocker recovery key if requested, then let Windows diagnose and repair startup files and configuration. This can address boot corruption, but it is not a specific cure for the installation loop.
If recovery requests a BitLocker key, use another device to open Microsoft's recovery-key account page and sign in to the relevant Microsoft account. Match the recovery-key ID, then enter the corresponding key on the affected computer. The key enables recovery access; it does not repair the installation itself.
If Startup Repair does not resolve the problem, use the desktop repairs below when Windows still starts. Otherwise, move to the reset or clean-install route that matches your available recovery tools and file-preservation needs.
Repair Windows when the desktop still opens
When a failed upgrade leaves the previous Windows installation usable, install available Windows updates and obtain compatible drivers from the PC or hardware manufacturer before retrying. These steps apply to a working installation being upgraded to Windows 11. They cannot be performed directly from the failed Setup dialog.
You can also repair Windows using Command Prompt before another upgrade attempt. Search for Command Prompt, right-click it, select Run as administrator, then select Yes. Enter this command and wait for it to complete successfully:
DISM.exe /Online /Cleanup-image /RestorehealthNext, run System File Checker with the command below. Wait for verification to finish before retrying installation.
sfc /scannowRun those commands from the working Windows desktop. The /Online option targets the currently running operating system, so these instructions should not be reused in recovery as an offline repair of the installed copy.
On Windows 11 22H2 or later with the February 2024 optional update or later, open Start > Settings > System > Recovery. Under Fix problems using Windows Update, select Reinstall now. Leave the optional automatic-restart choice unchanged and select OK.
Keep internet and power connected while Windows repairs its components, preserving files, apps and settings. Restart after completion if Windows does not restart automatically. On a work- or school-managed PC, management policies can hide Fix problems using Windows Update; ask your administrator to review recovery availability and use your organization's approved recovery process.
If you have a working Windows 11 desktop and compatible installation media, you can also perform an in-place repair installation. While signed in to Windows, connect matching installation media and open its setup.exe file in File Explorer. Select Yes, select Change what to keep, then choose Keep personal files and apps > Next > Install. Start this procedure from the desktop, because booting directly from USB does not provide this app-preserving procedure.
Retry a reset with Cloud download
A functioning reset environment gives you another route when an existing installation remains recoverable. In recovery, select Troubleshoot > Reset this PC. From an accessible Windows 11 desktop, open Settings > System > Recovery > Reset PC.
A reset removes apps and settings, and its full-removal option also deletes personal files, so back up recoverable data before continuing. To reset Windows while keeping personal files, choose Keep my files; for a reset that also removes personal files, choose Remove everything. File preservation depends on your selection and the existing recoverable installation.
Choose Cloud download for a fresh download when local recovery files may be damaged. The Local reinstall option uses existing files instead. Complete the reset prompts and leave the computer powered on through long black screens and automatic restarts.
If the reset fails or its recovery environment does not work, proceed with the fresh installation media you created earlier. Do not interrupt an installation or reset that is still progressing.
Clean install Windows on the intended disk
A clean installation destroys data on the selected Windows disk, so back up recoverable files before continuing. Boot the fresh installer, complete Select language settings and Select keyboard settings, then select Install Windows 11. Turn on the setting that reads "I agree everything will be deleted including files, apps, and settings", then select Next.
Supply the appropriate product key, or select I don't have a product key if the device's digital license is linked to your Microsoft account. Choose the matching Windows edition, then select Accept.
Deleting partitions destroys data on the target disk, so back up recoverable files before continuing. At Select location to install Windows 11, identify the intended Windows disk carefully, especially if the computer contains multiple drives, and use Delete Partition on that disk's partitions only. Select its Unallocated Space, then select Next > Install.
If installation continues to fail with fresh media, use recovery or diagnostics intended for your model. The Dell options below apply only to supported devices.
Use model specific recovery and diagnostics
On supported Dell models originally supplied with Windows 10 or Windows 11, tap F12 at the Dell logo and select SupportAssist OS Recovery. Select APPROVE, then select Scan in Scan Hardware and select Start Scan. SupportAssist OS Recovery excludes Qualcomm-based Dell PCs.
For its software-repair option, select Repair in Repair software, then select START REPAIR. If local recovery is unavailable on a Dell that supports BIOSConnect, tap F12 during startup and select SupportAssist OS Recovery. Connect Ethernet, or choose a Wi-Fi network, enter its password and select Connect to download and start the recovery environment.
If BIOSConnect is disabled on a supported model, use F12 > BIOS Setup or System Setup. Locate BIOSConnect and SupportAssist OS Recovery, enable them and save. Firmware layout and recovery availability depend on the model.
Frequently Asked Questions
Why does the Setup shortcut fail to open Command Prompt?
The Shift + F10 shortcut opens Command Prompt during Windows 11 Setup when diagnostic access is enabled. Access can depend on how Setup was launched, and the diagnostic-prompt setting can disable it during offline and initial setup phases. Opening the prompt provides troubleshooting access rather than a repair.
Should you use DiskPart to fix the unexpected restart message?
DiskPart partition conversion applies to a confirmed UEFI/GPT mismatch, rather than serving as a specific repair for this message. Its clean command removes the selected disk's partition information. Use that route only after backing up and confirming that the correct target disk may be erased.
Can Quick machine recovery fix an installation loop?
Quick machine recovery is relevant when Microsoft has a remediation for the underlying widespread boot failure. It applies to updated Windows 11 24H2 or later with the feature available and is not a general installation-loop fix.
Can you use a recovery drive made on another computer?
Use a Windows recovery drive created for the affected device. Creating a recovery drive on an unrelated computer is not equivalent to downloading a generic Windows installer. Recovery from that drive reinstalls Windows and removes personal files.
Can System Restore help after a failed clean installation?
System Restore requires a usable restore point that survives in an existing Windows 11 installation. It is not a solution for a blank drive or a clean installation without restore points. Point-in-time restore is a separate option on updated Windows 11 24H2 or later where the feature and an existing snapshot are available; it also rolls back personal files changed after that snapshot.