Fix Windows Update Is Stuck In An Endless Loop

Windows Update can fail during the updates installation if the updates began to be installed during a shutdown operation of your computer.

When you force restart your computer, Windows boots again with Windows Update trying to install the pending updates.

A quick fix for the loop error could be booting into the Last Known Good Configuration mode:

1. Restart the computer

2. Press the F8 key as soon as the computer boots, but before the Windows Vista or Windows 7 logo appears on the screen

3. At the Advanced Boot Options screen, select Last Known Good Configuration (advanced)


4. Press Enter key.

If this fix doesn’t solve the loop error, try any of the following fixes below.

 Delete cleanup.xml and pending.xml

The Windows Update loop can be fixed in most cases by deleting the following files found in the \Windows\WinSxS\ folder:

  • cleanup.xml

  • pending.xml

Boot your computer with Windows Setup Media and from Windows Recovery Environment start the Command Prompt.

Type below commands into Command Prompt and press Enter key.

del C:\Windows\WinSxS\cleanup.xml

del C:\Windows\WinSxS\pending.xml


Restart your computer.

If deleting pending.xml and cleanup.xml doesn’t work, use the DISM command:

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

Where C: is the drive where Windows 8/8.1/10 is installed.

You may have to replace partition letter C: with Windows installed partition letter. When computer boots into Windows Recovery Environment (WinRE) environment the drive letter assign to Windows partition may not be C: drive letter because Windows 7, 8 , 8.1 and 10 creates a separate system partition when it's installed from scratch. The system partition contains boot files WinRE assigns the system partition the C: drive letter and the Windows installed partition will be assign any other drive letter usually D: drive letter is assign to Windows installed partition. The Bcdedit /enum | find "osdevice" command can be use to find out the drive letter of the Windows installed partition the output of the Bcdedit command is similar to this osdevice partition=D:. The drive letter after partition= is the drive letter of the Windows partition.


If System Restore was enabled and running on your system, you can try to restore your computer to an earlier date to access Windows. You can try boot your computer into Safe Mode and use System Restore tool. You can also use System Restore tool from Windows Recovery Environment.
Last edited: