Understanding Microsoft Windows Update Agent

Hector2016Systems Administrator and Solutions Architect
What to do when Windows Update is not working correctly? What tools can I use to detect the cause of the malfunction problem? What does this numeric error code mean? These and other questions that you have been asking in the past are answered here (or at least you will know what to do next).
It is very important to know how the Windows Update mechanism works to find out and solve the possible problems associated with it. By definition, the Windows Update is a three-stage process viewed on the side of the client, and these stages are: Search, Download and Install.

Fig 1. Microsoft Windows Update is a three-stage process.
In the Search stage, the client computer connects to the WSUS server, and after authentication, it asks for the set of updates approved for the products installed locally. The WSUS server stores the data sent by the client on its database and responds with the list of updates available for the indicated products.

Then the Windows Update Service (WUAUSERV) on the client computer uses the Background Intelligent Transfer Service (BITS) to download each update package to the Download sub-folder on the %WinDir%\SoftwareDistribution folder. When the Download stage is completed, control is passed to the Windows Trusted Installer (TrustedInstaller), the process authorized to install without restrictions. After the last update package is installed the Installation stage may need to restart the client computer to complete the file replacement operations. That is the normal process of updating software with Microsoft Windows Update Client.

All the client operations are recorded in a text file called WindowsUpdate.Log that resides in the %WinDir% folder. Microsoft has provided some guidelines to read the log file. Important information is also stored in the Registry, specifically below the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate.

The Windows Update agent (or client) gets its configuration from the registry at service startup. All the settings related to the WUAUSERV service are in the key HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate and HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. These same configuration options are available as Group Policy Objects. You can find more about the registry settings in this Microsoft article and the GPO is described in this one.

But as all things in the real world, Windows updates are not error free. In my experience, these errors are frequently related to:
  • network issues
  • file integrity loss by storage space exhaustion.

Dealing with network issues

To identify a network issue you can try PING to the WSUS server from the client. If there is a firewall between the client and the WSUS server and ICMP traffic is not allowed or if you need to verify HTTP traffic, then you should try to browse one of these URLs (without proxy):
You cannot browse on WSUS directories by default for security reasons, so the test must be a file download. For a more detailed test you can also use the excelent free tool from SolarWinds for the WSUS Agent (Requires .Net).

Dealing with file integrity loss by storage space exhaustion (On download stage)

From time to time, the partition where the operative system is installed, and where the SOFTWAREDISTRIBUTION folder resides, gets full. This could happen when a large number of updates are downloaded or when an update is large, like the Windows 10 upgrade pack. This problem happens because the BITS service in charge of downloading the updates is not aware of free disk space until it fail to download a package, and then it is too late. The result is a corrupted package.

To solve this you will have to use a third-party tool like the Minitool Partition Wizard to resize system partition if possible. If there is no free space on another partition on the same physical disk to make the re-size operation, it is imperative to delete or move some files from the system partition to elsewhere. You can use the windows cleaning tool CleanMgr, and/or the free tool CCleanner.

Then with all the needed space free on the system partition you must stop the BITS and WUAUSERV services and delete the sub-folder DOWNLOAD inside SOFTWAREDISTRIBUTION. When you start BITS and WUAUSERV, and re-try the update process, it should do all well.

Dealing with file integrity loss by storage space exhaustion (On install stage)

Things gets worse when the disk is filled during the installation stage, because the problem affects the SXS folder files inside %WinDIR% folder. To solve this it will be necessary to do a long-time-delay procedure. Sometimes it is better to re-install the Windows operating system instead of trying to restore the corrupted files. That procedure looks like the following:

  1. Resize System Partition or move files to elsewhere.
  2. Run System File Checker tool. At an elevated command prompt type: SFC /scannow. If the files affected are recoverable this should fix the problem.
  3. If problem continues, follow the steps described in this article KB947821 from Microsoft.
As a last resource, you must not forget that you can repair/reinstall Windows operative system. This is a drastic solution, but it will be successful most of the time. Save all important data and prepare all the needed drivers and applications before start doing the reinstall.

About the error codes

It is very common to hear complaints about the cryptic error codes on Microsoft products. I have listed some pages from Microsoft's website with error codes descriptions. You will not feel so lost the next time you see one of this numbers on the screen.
  • For errors related directly to Microsoft Windows Update Agent see this list.
  • For other errors look here.
You can always ask Microsoft support if the error is not in the previous lists, or if you cannot do much with that information. Thanks for reading; I hope this will be helpful.
Hector2016Systems Administrator and Solutions Architect

Comments (1)

Hector2016Systems Administrator and Solutions Architect


Please, dont. I had corrected it manually.
Let it just as is.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.