Fix: Windows 10 hangs in update installation loop

[German]Windows 10 (and earlier versions of Windows, if applicable) fails in some situation during update installation may be forced into an update install loop. In this blog post I try to sketch what you can do. I wrote the hints with Windows 10 in mind, but you can use most of the hints for older versions of Windows.


Advertising


The Error: An Update Installation Loop

The error description is quite the same from affected users. An update is downloaded from Microsoft’s servers on the system and then the system tries to install this package. However, an error occurs during this process, so that the installation is rolled back during reboot and Windows restarts. 

Update install

The update is then loaded and installed again via Windows Update. But this fails again, so that the rollback operation outlined above starts again. The system is stuck in an update installation loop.

Fix #1: Try a clean Windows boot

The first approach to try is to perform a clean boot for Windows. Sometimes this clean boot solves the installation issues. How to perform a clean restart in Windows is described in this Microsoft article.

Fix #2: Update Troubleshooting

To resolve the problem with the update installation, you should first check whether the Update Troubleshooter in Windows 10 can interrupt the update loop and fix the problem.

1. Type ‘trouble’ into the taskbar’s search box and select the result for the troubleshooter.


Advertising

2. In settings page go to Windows Update and click the Troubleshooter button.

3. Confirm the UAC prompt and follow the steps to repair Windows Update.

If you have luck, the install issue is fixed after reboot. In case the steps above doesn’t works, try the troubleshooter and advices on Microsofts article Fix Windows Update issues. Have also a look at this page with the Update Troubleshooter and the blog article Windows 10: New update troubleshooter app and site, maybe you are successful.

Background: How Windows installs updates

Before we dig into the steps to remove a buggy update, some background information about what happens when installing an update.

  • In the first step, Windows Update determines the missing updates and downloads them to an update store (component store). 
  • During the update installation, a file Pending.xml is written to indicate which updates are due for installation.

The last point is important because many updates need to exchange files in use during installation. However, this is not possible within a running system. Therefore, Windows will restart. In an early phase, only Windows PE components are loaded. There it is checked whether there are updates to be installed in the file Pending.xml. Only after an update has been successfully installed does the installer remove the entry in the Pending.xml file.

If an update fails during installation, the installer forces a rolls back. Normally the entry in the file Pending.xml should also be removed. However, this does not always work (especially if external virus scanners interfere). Then the system is facing an update install loop, where Windows tells you that updates would be installed when you boot up or shut down – and you shouldn’t switch off your system.

Fix #3: Remove updates from Pending.xml

If the troubleshooter does not help, try to remove the pending updates from the Pending.xml file. This approach is intended for experienced users only. To do this, a command prompt window needs to be opened via Run as administrator context menu command from start menu. Then enter the following command:

dism.exe /image:C:\ /cleanup-image /revertpendingactions

The command works under Windows 10 (and probably also in Windows 8.1), but not in Windows 7 (there is no DISM command there). If this does not help, the pending.xml file and registry entries can be cleaned up. The registry entries to delete are described in this Microsoft Support article.

What to do after removing the hanging update

Once the hanging update has been removed, the update store should be emptied and the problematic update should be blocked for reinstallation. 

Clear Windows Update store

In a further step you should clear / empty the update store of Windows (folder SoftwareDistribution.old). I have described the steps within my blog post Stop Windows from installing updates over and over again.

Block the faulty Windows Update

To prevent Windows from downloading and reinstalling the non-installable update after a few minutes, block the package in question. In Windows 7 and Windows 8.1 this is possible with a few mouse clicks in Windows Update via the context menu.

In Windows 10 you can delay an update in the Pro and Enterprise version for a certain time (see here). But this does not work in Windows 10 Home. Therefore, the update should be blocked with the wushowhide.diagcab help tool (KB3073930). 

How it works, is described within my blog post How to block Windows 10 updates.

Similar articles:
Win10 Wiki
Windows 10: Open command prompt window as administrator
Check and repair Windows system files and component store
Activate Build-in Administrator account in Windows – I
Windows 10: Analyze upgrade errors
Uninstalling ‘uninstallable’ Windows Updates
Windows 7/8.1/10: error side-by-side configuration is incorrect
Windows: Yes button in user account controls is disabled
Windows 10: file system error (-1073741819) – ‘extended attributes are inconsistent’
How to block Windows 10 updates


Advertising


This entry was posted in issue, Update, Windows and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *