How to Repair Windows Update Agent and Fix Update Errors

If you’re experiencing issues with Windows Update, such as updates not downloading or installing properly, resetting the Windows Update agent and service to their default settings can often resolve the problem. In this article, we’ll guide you through the steps to repair your Windows Update agent and fix common update errors.

Using the Windows Update Troubleshooter

Before attempting to manually reset the Windows Update components, it’s recommended to try the built-in Windows Update Troubleshooter. This tool can automatically detect and fix issues with the Windows Update service.

To access the Windows Update Troubleshooter:

  • In Windows 11, go to Settings -> System -> Troubleshooter -> Other Troubleshooter -> Windows Update
  • In Windows 10, you can download the troubleshooter from https://aka.ms/wudiag or run the local version from Start -> Settings -> Updates and Security -> Troubleshoot -> Additional Troubleshooters-> Windows Updates
  • In Windows 7 and 8.1, download the troubleshooter from https://aka.ms/diag_wu

Run the troubleshooter and follow the on-screen instructions. If the troubleshooter detects and fixes any issues, restart your computer and try updating again. If the problem persists, proceed to the next step.

Resetting Windows Update Components Using PowerShell

You can use the PSWindowsUpdate PowerShell module to reset the Windows Update agent and service. Here’s how:

  1. Install the PSWindowsUpdate module from the PSGallery script gallery: Install-Module -Name PSWindowsUpdate
  2. Allow PowerShell scripts to run: Set-ExecutionPolicy –ExecutionPolicy RemoteSigned -force
  3. Run the Reset-WUComponents command: Reset-WUComponents –verbose

The Reset-WUComponents command stops services, re-registers DLLs, and cleans up the C:\Windows\SoftwareDistribution folder. The full log of actions is available in the PowerShell console.

See also  How to Repair Windows Startup: A Comprehensive Guide

Manually Resetting Windows Update Components

If you prefer to manually reset the Windows Update components, follow these steps:

  1. Open an elevated command prompt (run as administrator)
  2. Stop the BITS, Windows Update, and Cryptographic services: net stop bits net stop wuauserv net stop cryptsvc
  3. Delete the qmgr*.dat files: Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
  4. Rename the following folders to *.BAK: %Systemroot%\SoftwareDistribution\DataStore %Systemroot%\SoftwareDistribution\Download %Systemroot%\System32\catroot2 To do this, run the following commands: Ren %Systemroot%\SoftwareDistribution\DataStore DataStore.bak Ren %Systemroot%\SoftwareDistribution\Download Download.bak Ren %Systemroot%\System32\catroot2 catroot2.bak
  5. Reset the BITS and Windows Update service security descriptors: sc.exe sdset bits D:(A;CI;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU) sc.exe sdset wuauserv D:(A;;CCLCSWRPLORC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)
  6. Reregister the BITS and Windows Update files: cd /d %windir%\system32 regsvr32.exe atl.dll regsvr32.exe urlmon.dll regsvr32.exe mshtml.dll regsvr32.exe shdocvw.dll regsvr32.exe browseui.dll regsvr32.exe jscript.dll regsvr32.exe vbscript.dll regsvr32.exe scrrun.dll regsvr32.exe msxml.dll regsvr32.exe msxml3.dll regsvr32.exe msxml6.dll regsvr32.exe actxprxy.dll regsvr32.exe softpub.dll regsvr32.exe wintrust.dll regsvr32.exe dssenh.dll regsvr32.exe rsaenh.dll regsvr32.exe gpkcsp.dll regsvr32.exe sccbase.dll regsvr32.exe slbcsp.dll regsvr32.exe cryptdlg.dll regsvr32.exe oleaut32.dll regsvr32.exe ole32.dll regsvr32.exe shell32.dll regsvr32.exe initpki.dll regsvr32.exe wuapi.dll regsvr32.exe wuaueng.dll regsvr32.exe wuaueng1.dll regsvr32.exe wucltui.dll regsvr32.exe wups.dll regsvr32.exe wups2.dll regsvr32.exe wuweb.dll regsvr32.exe qmgr.dll regsvr32.exe qmgrprxy.dll regsvr32.exe wucltui.dll regsvr32.exe wups.dll regsvr32.exe wups2.dll regsvr32.exe wuweb.dll
  7. Reset the Winsock settings: netsh winsock reset
  8. Restart your computer

After completing these steps, try updating your system again. If the problem persists, you may need to further investigate specific error codes or seek additional support.

By following these methods to repair your Windows Update agent and reset the Windows Update components, you should be able to resolve most common update issues and ensure your system stays up to date.

By admin

Leave a Reply

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