Fix: Windows Upgrade Failed with 0x4005(16389) Error

Freeing up disk space proves to be the most suitable solution

Reading time icon 5 min. read

Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • Many users have reported that they encountered the 0x4005(16389) error while performing an in-place upgrade to Windows 11.
  • The error appears if one or more applications installed on your computer are not compatible with the new Windows, resulting in a failed upgrade process.
  • SCCM may encounter this error when attempting to deploy or manage software, deploy new operating systems, or perform in-place upgrades on a client computer.
error code 0x4005 (16389)

The error code 0x4005(16389) is a common Windows system error that can occur when upgrading Windows. It usually indicates that there was an issue during the upgrade process, such as a failure to install or update a specific system component or driver.

In this guide, we will discuss the possible causes of the 0x4005(16389) error and provide step-by-step instructions on how to fix it.

What causes 0x4005(16389) error?

The error code 0x4005(16389) can occur during a Windows upgrade process and is usually associated with the following common causes:

  • Different Windows edition: If the Windows edition you are trying to upgrade to differs from the one currently installed on your computer.
  • Third-party antivirus conflicts: Certain third-party software installed on your computer may conflict with the Windows upgrade process and cause the 0x4005 error.
  • Insufficient storage space: If your computer’s hard drive does not have enough space to install the Windows upgrade files, the process may fail and result in the 0x4005 error.
  • Corrupt system files: If the essential Windows system files are corrupt, it can lead to the 0x4005 error.
  • Local Computer Description: If you set the computer description during the task sequence, the error code may occur if the script or command used to perform this action fails.

How do I fix the 0x4005(16389) error when upgrading Windows?

Before attempting more complex solutions, here are some straightforward steps to try:

  • Restart your device: Restarting your computer can often resolve the issue at hand.
  • Use the same Windows Edition to upgrade: If you attempt to upgrade to a different version of Windows than what’s on your computer, ensure that you upgrade to the same edition.
  • Disable third-party antivirus programs: Antivirus programs can sometimes interfere with the upgrading process and prevent it from completing successfully. To avoid this issue, you should disable your antivirus program temporarily. 

1. Free up disk space

  1. Open the Start menu, type disk cleanup, and select the Disk Cleanup app from the search result.Disk Cleanup
  2. Select the drive system drive (typically labeled C🙂 and click OK.C drive
  3. Next, click the Clean up system files button.Clean system files
  4. Select the system drive again and click OK.Choose drive
  5. Now, select the files you wish to delete, and click OK.Choose files to delete
  6. Click Delete Files to confirm. Delete files

Insufficient disk space is a common issue that arises during Windows updates and upgrades, making it impossible to install them. According to Microsoft, you will need at least 20 GB of free space for upgrading to Windows 10 or 64 GB of free space for Windows 11.

You can also defragment the drive to free up some space and optimize the PC’s performance.

2. Extend the partition to create more space

  1. Press the Windows + R to open the Run command, type diskmgmt.msc, and hit Enter. diskmgmt.msc
  2. If you want to shrink a volume, locate the drive or partition, right-click on it, and select Shrink Volume…Shrink Volume
  3. Enter the amount of space you want to subtract from the drive in MB and click Shrink.Shrink
  4. In case you want to delete a volume, right-click on the unused drive/partition you want to delete and select Delete Volume...Delete volume
  5. Right-click on the drive/partition you want to extend and select Extend Volume…Extend volume
  6. In the Extend Volume Wizard window, click Next.Extend
  7. Click Next to add all the unallocated space to the drive you want to extend or specify the volume size you want to add and then click Next.specify the size.
  8. Click Finish to extend the drive.finish
  9. If you see a warning prompt, click Yes to proceed.finish
Note icon NOTE
To expand the storage capacity of a drive or partition, you must first reduce the size of another drive or remove an unused drive to generate unallocated space. Then, you can use the unallocated space to increase the volume of any drive on your disk.

3. Change the local computer description command

Note icon NOTE
These instructions are intended for IT professionals or system administrators who are using System Center Configuration Manager (SCCM) to deploy Windows operating systems in an enterprise environment.
  1. Confirm if the error is related to a script or command failing during the task sequence, which is responsible for setting the local computer description. 
  1. Open the task sequence in the System Center Configuration Manager (SCCM) console and locate the option for setting the computer description.
  2. Add a Run Command-Line to the task sequence and then run the following command:cmd /c net config Server /SRVCOMMENT:"%OSDComputerDescription%"
  3. Save the changes.
  4. Run the task sequence again, and the error should now be resolved.

If you encounter the 0x4005(16389) error while attempting to set the local computer description using a script or command during the task sequence, you can use this method to resolve the error and successfully complete the task sequence.

4. Clean install Windows

4.1 Create Windows installation media

  1. Insert a blank USB or blank DVD with at least 8 GB of space.
  2. Go to the Windows 11 download page on the official Microsoft website.
  3. Under Create Windows 11 Installation Media section and click Download Now.Download Windows media creation tool
  4. Once downloaded, run the mediacreationtool.exe file.
  5. Click Accept to continue.Accept
  6. To select a different language, untick the checkbox beside Use the recommended options for this PC. Then, click Next.change language
  7. Choose the USB flash drive option and click Next.USB flash drive
  8. Select the USB drive you want to use, and click USB
  9. Wait for the setup to download all the necessary files to the flash drive.Downloading
  10. When the download is complete, click Finish.Finish

4.2 Install the Windows operating system

  1. Restart your computer and press Esc, F2, F10, or F12 to access the boot menu, and select the USB media to boot from.
  2. Choose the language and input method, and then click Next.Choose lang
  3. Click Install now.Install now
  4. Input your Windows product key and click Next or click I don’t have a product windows
  5. Choose the Windows edition and click Next.Choose edition
  6. Select the Custom: Install Windows only (advanced) option.Custom
  7. Choose the partition where you want to install Windows and click Next. Select partition
  8. After the installation, follow the on-screen instructions to set up your computer.

We hope one of these solutions helps you fix the 0x4005(16389) error. After you’ve upgraded, learn how to the most of Windows 11 features.

Please let us know in the comment section if you have further questions or suggestions.

More about the topics: Windows 11, Windows Installation errors