Some PC users still running Windows 10 when trying to upgrade to Windows 11 or update to the latest build of Windows 10 on their device may encounter the Windows Upgrade error code 80040005 – 0x20007. If you’re affected by similar issue, you can try the solutions provided in this post to resolve the issue.
This Windows Upgrade error code indicates that an unspecified error occurred with a driver during the SafeOS phase.
Windows Upgrade error code 80040005 – 0x20007
We recommend you try the following fixes, to resolve this Windows Upgrade error 80040005 – 0x20007 on your Windows 11/10/Server, and if not successful, analyze the Upgrade log files in order to determine the exact problem and solution.
- Check System Requirements
- Update device drivers
- Update BIOS
- Run Windows Update Troubleshooter
- Disconnect nonessential external hardware
- Run SFC and DISM scan
- Run CHKDSK
- Uninstall third-party Security software (if applicable)
- Run SetupDiag
- Use Microsoft Virtual Support Agent
Let’s take a look at the description of the process involved concerning each of the listed solutions.
Before you try the solutions below, check for updates and install any available bits on your Windows device and see if the error reappears when you re-run the upgrade operation. Also, make sure that the radio button for the Download and install updates (recommended) option is selected at the start of the upgrade process.
1] Check System Requirements
Most Windows 11/10 upgrade error can occur if the PC does not meet minimum system requirements.
This solution requires you to check system requirements for Windows 11 or check if your device can run Windows 10 as the case may be. It’s imperative to point out that you can install Windows 11 on unsupported hardware.
Proceed with the next solution if your device meets minimum system requirements but the Windows Upgrade error 80040005 – 0x20007 is unresolved.
2] Update device drivers
Outdated device drivers on your computer can be the culprit here. In this case, make sure to update your drivers manually via the Device Manager, or you can get the driver updates on the Optional Updates section under Windows Update. You may also download the latest version of the driver for any device from the manufacturer’s website.
If all drivers are up to date but the error persists, you can try the next solution.
3] Update BIOS
This solution requires you update the BIOS for your system, and afterwards, re-run the upgarde operation and see if the procedure completes successfully. Otherwise, try the next solution.
4] Run Windows Update Troubleshooter
This solution requires you to run the inbuilt Windows Update Troubleshooter and then try the upgrade operation again. If the procedure fails again, try the next solution.
5] Disconnect nonessential external hardware
Before you try the upgrade operation, if the computer is portable and it is currently in a docking station, you need to first undock the computer. Also, unplug nonessential external hardware devices from the computer, such as the following:
- USB flash drives
- Portable hard drives
- Portable CD/DVD/Blu-ray drives
- Media card readers
- Smart phones
- Secondary monitors, keyboards, mice
If the issue is still unresolved, try the next solution.
6] Run SFC and DISM scan
This solution requires you to run the SFC/DISM utility to scan for corruptions in Windows image and system files and restore corrupted files.
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type notepad and hit Enter to open Notepad.
- Copy and paste the syntax below into the text editor.
echo off date /t & time /t echo Dism /Online /Cleanup-Image /StartComponentCleanup Dism /Online /Cleanup-Image /StartComponentCleanup echo ... date /t & time /t echo Dism /Online /Cleanup-Image /RestoreHealth Dism /Online /Cleanup-Image /RestoreHealth echo ... date /t & time /t echo SFC /scannow SFC /scannow date /t & time /t pause
- Save the file with a name and append the .bat file extension – eg; SFC_DISM_scan.bat and on the Save as type box select All Files.
- Repeatedly run the batch file with admin privilege (right-click the saved file and select Run as Administrator from the context menu) until it reports no errors.
- Restart your PC.
On boot, try the upgrade again. If unsuccessful, proceed with the next solution.
7] Run CHKDSK
This solution requires you to run CHKDSK to repair errors or bad sectors on the system drive, which may be causing the upgrade process to fail. The system drive is the drive that contains the system partition. This is usually the C: drive.
8] Uninstall third-party Security software (if applicable)
Third-party security software installed on your device can interfere with the upgrade process and consequently trigger this error. We recommend using Windows Defender for protection during the upgrade.
To uninstall the third-party antivirus programs from your PC, we recommend using the dedicated removal tool to remove all files associated with your antivirus program.
Once the upgrade completes successfully, you can verify compatibility information, and if desired, re-install the third-party antivirus application.
Also, keep in mind that outdated applications can cause problems with a Windows upgrade. In this case, you can uninstall outdated, unused or non-essential applications from the computer. We recommend using third-party software uninstaller.
9] Run SetupDiag
You can run SetupDiag – a new tool available from Microsoft that helps PC users diagnose many Windows upgrade errors.
10] Use Microsoft Virtual Support Agent
If none of the solutions worked for you so far, you can use the Microsoft Virtual Support Agent to troubleshoot the upgrade error on your Windows 11/10 device.
Related error posts:
- Installation failed in SAFE_OS phase with error during INSTALL_UPDATES operation, Error 0x800f0830-0x20003
- Installation failed in SAFE_OS phase with an error during BOOT operation, 0xC1900101 – 0x20017
- The installation failed in the SAFE_OS phase with an error during MIGRATE_DATA operation
- The installation failed in the SAFE_OS phase during INSTALL_UPDATES, 0x800F081F – 0x20003
- Installation failed in SAFE_OS phase with an error during Replicate_OC operation, 0xC1900101 – 0x20006.
Why does my Windows Upgrade keep failing?
If your Windows 11/10 upgrade keeps failing on your system, it’s likely due to these two most common causes:
- Multiple updates queued: Installing the updates one after the other will fix the problem in this case.
- Corrupt update files: Deleting the bad update files will usually fix this problem. You may need to boot into Safe Mode to clear the files.
How do I repair the Windows Update?
To repair the latest Windows 11 update, you can run the Windows Update Troubleshooter. Here’s how: Open Settings > System > Troubleshoot. Click on Additional Troubleshooters and select Windows Update option. Finally, click on Run the troubleshooter button. Once done, you can close the Troubleshooter and check for updates.