Fix Setup Failure Error in Windows 11: Step-by-Step
In this article
A setup failure error in Windows 11 usually means the installer could not copy files, create the required partitions, or finish configuring the system. The quickest fix is to unplug every non-essential device, run the installer again from a freshly created USB drive, and use Diskpart to clean the target disk before installing. If that fails, check the ISO integrity and update your motherboard firmware. This guide walks through the most effective methods in order, from safest to most thorough.
What You'll Need
- A Windows 11 installation USB drive (8 GB or larger) created with the official Media Creation Tool or a verified ISO.
- The target PC with access to its UEFI/BIOS settings.
- A second working computer to rebuild the USB if needed.
- Backup of any data on the drive you plan to install Windows on — cleaning a disk erases everything.
Step-by-Step
- Disconnect all unnecessary hardware. Unplug printers, external drives, USB hubs, webcams, and card readers. Leave only the keyboard, mouse, monitor, and installation USB connected. Faulty peripherals are a common cause of setup failures.
- Rebuild the installation USB. On a working PC, download the Windows 11 Media Creation Tool from Microsoft's official site and create a new USB drive. If you use an ISO, verify its SHA-256 hash before writing it with Rufus or the Media Creation Tool. A corrupted installer file causes repeat failures.
- Boot from the USB in UEFI mode. Restart the PC and enter the boot menu (often F12, F11, or Esc during startup — the key varies by manufacturer). Choose the entry that starts with "UEFI" and your USB drive's name. Booting in legacy mode can trigger setup errors on modern hardware.
- Start Setup and choose Custom install. When the installer opens, select your language and click Next, then Install Now. Choose "Custom: Install Windows only (advanced)" rather than an upgrade, so you can control the target partition.
- Delete the existing partitions on the target drive. On the partition screen, select each partition on the drive you want to use and click Delete until only unallocated space remains. This removes old boot records and corrupted file system structures. Warning: this erases all data on that drive.
- Let Windows create the partitions automatically. Select the unallocated space and click Next. Setup will create the required EFI, MSR, and primary partitions. Do not manually create partitions unless you have a specific reason.
- If setup still fails, clean the disk with Diskpart. At the first setup screen, press Shift+F10 to open Command Prompt. Type
diskpart, thenlist disk,select disk X(replace X with your target disk number),clean, andexit. Close the command prompt and click Refresh on the partition screen, then select the unallocated space and click Next. - Update your motherboard firmware and storage drivers. If failures persist, check your PC or motherboard manufacturer's support site for a BIOS/UEFI update. Some storage controllers need a driver loaded during setup — download the driver to the USB and use the "Load driver" link on the partition screen.
- Check RAM and disk health. Run Windows Memory Diagnostic from the recovery environment or a bootable memory tester, and check the drive with the manufacturer's diagnostic tool. Failing hardware causes setup to fail at random points.
- Disable fast boot and secure boot temporarily. In UEFI settings, turn off Fast Boot. If setup fails with a secure boot error, disable Secure Boot, install Windows, then re-enable it after installation. Re-enable it afterward for security.
Common Mistakes
- Using a USB drive created by an unofficial tool or a modified ISO — always use Microsoft's Media Creation Tool or a verified official ISO.
- Leaving external drives connected, which can confuse drive letter assignment and cause setup to target the wrong disk.
- Skipping the partition deletion step and installing over a corrupted existing installation.
- Booting in legacy/CSM mode instead of UEFI mode on a system that supports UEFI.
- Forgetting to back up data before cleaning a disk — Diskpart's clean command wipes the entire drive.
Tips
- Use a USB 3.0 drive from a reputable brand; cheap drives can drop data during installation.
- Keep the PC plugged into power (laptops) and use a wired keyboard and mouse if possible.
- If you have multiple drives, temporarily disconnect the non-target drives to avoid boot partition mix-ups.
- Note the exact error message or code — it narrows down whether the issue is storage, memory, or firmware.
Troubleshooting
If setup fails with a specific error code, search Microsoft's official support site for that code. For "Windows cannot install required files," rebuild the USB and clean the disk. For "We couldn't create a new partition," use Diskpart to clean and convert the disk to GPT with convert gpt. For "The selected disk is of the GPT partition style" on older systems, the disk may need to be converted to MBR — but only if your system does not support UEFI. If the installer freezes, test the RAM and try a different USB port (preferably rear USB 2.0 ports on desktops). If nothing works, try installing to a different drive to rule out a failing SSD or HDD.
Frequently Asked Questions
Why does Windows 11 setup fail at 0% or partway through?
Usually a corrupted installation USB, a failing drive, or a loose connection. Rebuild the USB, reseat the drive cables, and clean the disk with Diskpart.
Can I fix setup failure without losing my files?
If you choose the upgrade option and keep files, yes — but a clean install with partition deletion erases everything. Back up first.
Do I need to disable Secure Boot to install Windows 11?
No — Windows 11 requires Secure Boot capable hardware. Only disable it temporarily if setup throws a secure boot error, then re-enable it.
What does "Windows cannot install required files" mean?
The installer could not read from the USB or write to the target disk. Rebuild the USB, try a different port, and clean the disk.
How do I know if my USB drive is the problem?
Try the same USB on another PC. If setup fails there too, recreate the drive with the Media Creation Tool.
Is it safe to use Diskpart clean?
Yes, but it permanently erases the selected disk. Double-check the disk number with list disk before running clean.