Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows 10 / How to Reset Windows Update Components to Fix Update Errors

March 17, 2024 PowerShellWindows 10Windows 11Windows Server 2019

How to Reset Windows Update Components to Fix Update Errors

If the Windows Update service is not working properly, updates are not downloaded or installed, then the easiest and most effective way to solve the problem with the Windows Update service is to restore its original settings. In this article, we’ll show you how to reset the Windows Update agent and service configuration.

Contents:
  • Using Windows Update Troubleshooter to Fix Update Issues
  • Resetting Windows Update Client Using PowerShell
  • Using Reset Windows Update Tool
  • Reset Windows Update Settings Using Command Prompt

Usually, to debug Windows Update errors, an administrator needs to analyze the error codes in the %windir%\WindowsUpdate.log file (in Windows 10 you can get the WindowsUpdate.log this way). The number of possible errors that an administrator may encounter when analyzing the Windows update log is dozens (a complete list of Windows Update errors) and the process of resolving them is non-trivial. To avoid undue efforts and waste no time, it’s much easier to completely reset the Windows Update service and agent to the default state.

Windows Update error

Using Windows Update Troubleshooter to Fix Update Issues

Before proceeding to reset the configuration of Windows Update, we strongly recommend that you first try a simpler and quite effective tool to automatically fix problems in the Windows Update service using the built-in Windows Update Troubleshooter.

Windows Update Troubleshooter is already built into the modern Settings panel in Windows 10 and 11. For previous versions of Windows, you will have to download it manually:

  • Windows 11 — Settings -> System -> Troubleshooter -> Other Troubleshooter -> Windows Update; run windows update troubleshooter in windows 11
  • Windows 10 – wu10.diagcab (https://aka.ms/wudiag ) or run the local version of the tool: Start -> Settings -> Updates and Security -> Troubleshoot -> Additional Troubleshooters-> Windows Updates (Resolve problems that prevent you from updating Windows);win10: Windows Updates Troubleshooter-tool
    For quick access the Windows troubleshooting tools, you can use the ms-settings URI command: ms-settings:troubleshoot
  • Windows 7 and Windows 8.1 — WindowsUpdate.diagcab (https://aka.ms/diag_wu).

Wait for the Windows Update Troubleshooter to scan your system and attempt to automatically fix any errors in the Windows Update and related components.

fix windows update errors with the wu10.diagcab windows update troubleshooting tools - fix wndows update database corruption

In my case, corruption in the Windows Update database was found and fixed. After that, it remains to restart the computer and try to scan for updates. If updates are not downloaded or installed, proceed to the next step.

Resetting Windows Update Client Using PowerShell

You can use the PSWindowsUpdate PowerShell module to reset the Windows Update agent and service.

Install the module on your computer from the PSGallery script gallery:

Install-Module -Name PSWindowsUpdate

Allow PowerShell scripts to be run:

Set-ExecutionPolicy –ExecutionPolicy RemoteSigned -force

Run the command:

Reset-WUComponents –verbose

powershell: reset-wucomponents

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

VERBOSE: Background Intelligent Transfer Service (BITS)
VERBOSE: Windows Update (wuauserv)
VERBOSE: Application Identity (appidsvc)
VERBOSE: Cryptographic Services (cryptsvc)
Step 2: Delete the qmgr*.dat files
Step 3: Backup software distribution folders
VERBOSE: Renaming Software Distribution folder to C:\Windows\SoftwareDistribution.bak
VERBOSE: Renaming CatRoot  folder to C:\Windows\System32\Catroot2.bak
Step 4: Remove old Windows Update logs
VERBOSE: Deleting the C:\Windows\WindowsUpdate.log files.  
Step 5: Reset Windows Update services
VERBOSE: Reset BITS service
VERBOSE: Reset Windows Update service
Step 6: Reregister dll's
VERBOSE: regsvr32.exe / s atl.dll
VERBOSE: regsvr32.exe / s urlmon.dll
VERBOSE: regsvr32.exe / s mshtml.dll
VERBOSE: regsvr32.exe / s shdocvw.dll
VERBOSE: regsvr32.exe / s browseui.dll
VERBOSE: regsvr32.exe / s jscript.dll
VERBOSE: regsvr32.exe / s vbscript.dll
VERBOSE: regsvr32.exe / s scrrun.dll
VERBOSE: regsvr32.exe / s msxml.dll
VERBOSE: regsvr32.exe / s msxml3.dll
VERBOSE: regsvr32.exe / s msxml6.dll
VERBOSE: regsvr32.exe / s actxprxy.dll
VERBOSE: regsvr32.exe / s softpub.dll
VERBOSE: regsvr32.exe / s wintrust.dll
VERBOSE: regsvr32.exe / s dssenh.dll
VERBOSE: regsvr32.exe / s rsaenh.dll
VERBOSE: regsvr32.exe / s gpkcsp.dll
VERBOSE: regsvr32.exe / s sccbase.dll
VERBOSE: regsvr32.exe / s slbcsp.dll
VERBOSE: regsvr32.exe / s cryptdlg.dll
VERBOSE: regsvr32.exe / s oleaut32.dll
VERBOSE: regsvr32.exe / s ole32.dll
VERBOSE: regsvr32.exe / s shell32.dll
VERBOSE: regsvr32.exe / s initpki.dll
VERBOSE: regsvr32.exe / s wuapi.dll
VERBOSE: regsvr32.exe / s wuaueng.dll
VERBOSE: regsvr32.exe / s wuaueng1.dll
VERBOSE: regsvr32.exe / s wucltui.dll
VERBOSE: regsvr32.exe / s wups.dll
VERBOSE: regsvr32.exe / s wups2.dll
VERBOSE: regsvr32.exe / s wuweb.dll
VERBOSE: regsvr32.exe / s qmgr.dll
VERBOSE: regsvr32.exe / s qmgrprxy.dll
VERBOSE: regsvr32.exe / s wucltux.dll
VERBOSE: regsvr32.exe / s muweb.dll
VERBOSE: regsvr32.exe / s wuwebv.dll
Step 7: Reset WinSock
VERBOSE: netsh winsock reset
Step 8: Reset Proxy
VERBOSE: netsh winhttp reset proxy
Step 9: Start Windows Update services
VERBOSE: Cryptographic Services (cryptsvc)
VERBOSE: Application Identity (appidsvc)
VERBOSE: Windows Update (wuauserv)
VERBOSE: Background Intelligent Transfer Service (BITS)
Step 10: Start Windows Update services
VERBOSE: wuauclt /resetauthorization /detectnow

Search for updates in the Settings panel, or look for available Windows updates using PowerShell:

Get-WUList

powershell get-wulist - scan for windows updates

Using Reset Windows Update Tool

Reset Windows Update Tool is another useful and simple tool for resetting Windows Update settings. This script used to be available on TechNet. The author currently maintains a repository on GitHub (https://github.com/ManuelGil/Script-Reset-Windows-Update-Tool). Let’s consider how to use it.

A compiled wureset.exe file (C++) or a regular batch script is offered for download. I prefer to use cmd script.

  1. Download the ResetWUEng.zip and extract it;
  2. Run the ResetWUEng.cmd as an administrator;
  3. The script will detect your OS version (in my example, it is Windows 10) and will offer 18 different options. Some of them are not directly related to the reset of WU agent settings, but can be useful for fixing various Windows issues (checking the disk with the chkdsk, repairing the Windows image with DISM, resetting Winsock, clearing temporary files, etc.);Reset Windows Update Agent script
  4. To reset the Windows Update, it is usually sufficient to use option 2 – Resets the Windows Update Components. Press 2 and Enter; Resets the Windows Update Components
  5. The script will automatically perform all the actions that we described below when performing a manual reset of the Windows Update Agent from the command line;
    You can see the script performed actions by opening the ResetWUEng.cmd file in any text editor and examining its contents. For example, option 2 sends you to the :components function. ResetWUEng.cmd script code
  6. After the completion of the Reset Windows Update Tool script, restart your computer and check for new updates.

The ResetWUEng.cmd script is universal and suitable for all Windows versions starting from Windows XP and up to Windows 11.

Reset Windows Update Settings Using Command Prompt

The process of resetting the Windows Update agent and service configuration consists of several steps. All the described operations are performed in the elevated command prompt. I added all commands in the single bat file.

Using this script, you can completely reset the configuration of Windows Update and clear the local update cache. The script is applicable for both workstations with Windows 11/10/8.1/7 and Windows Server 2022/2019/2016/2012 R2/2008 R2. This script helps to eliminate most typical Windows Update errors when Windows stops downloading new updates or errors appear during the update installation.

Make sure the Windows Update settings on your computer are not configured using domain or local group policies. You can use the gpresult tool or rsop.msc to display the resulting GPO settings. Or you can reset local GPO settings according to this guide.

Let’s consider what this script does step by step:

  1. Stop Windows Update, BITS, and cryptographic services:
    net stop bits
    net stop wuauserv
    net stop appidsvc
    net stop cryptsvc
    taskkill /im wuauclt.exe /f
  2. Delete service files qmgr*.dat from the folder %ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\:
    Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
  3. Rename system folders, in which configuration files and update cache are stored (if necessary, they can be used as backups). After restarting the update service (wuauserv), these directories will be automatically recreated:
    Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
    Ren %systemroot%\system32\catroot2 catroot2.bak
  4. Delete the old windowsupdate.log file:
    del /f /s /q %windir%\windowsupdate.log
  5. Reset the permissions for BITS and Windows Update services (if service permissions have been changed):
    sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
    sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
    sc.exe sdset cryptsvc D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
    sc.exe sdset trustedinstaller D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
  6. Re-register the files of system dynamic libraries (DLLs) related to BITS and Windows Update:
    cd /d %windir%\system32
    regsvr32.exe /s atl.dll
    regsvr32.exe /s urlmon.dll
    regsvr32.exe /s mshtml.dll
    regsvr32.exe /s shdocvw.dll
    regsvr32.exe /s browseui.dll
    regsvr32.exe /s jscript.dll
    regsvr32.exe /s vbscript.dll
    regsvr32.exe /s scrrun.dll
    regsvr32.exe /s msxml.dll
    regsvr32.exe /s msxml3.dll
    regsvr32.exe /s msxml6.dll
    regsvr32.exe /s actxprxy.dll
    regsvr32.exe /s softpub.dll
    regsvr32.exe /s wintrust.dll
    regsvr32.exe /s dssenh.dll
    regsvr32.exe /s rsaenh.dll
    regsvr32.exe /s gpkcsp.dll
    regsvr32.exe /s sccbase.dll
    regsvr32.exe /s slbcsp.dll
    regsvr32.exe /s cryptdlg.dll
    regsvr32.exe /s oleaut32.dll
    regsvr32.exe /s ole32.dll
    regsvr32.exe /s shell32.dll
    regsvr32.exe /s initpki.dll
    regsvr32.exe /s wuapi.dll
    regsvr32.exe /s wuaueng.dll
    regsvr32.exe /s wuaueng1.dll
    regsvr32.exe /s wucltui.dll
    regsvr32.exe /s wups.dll
    regsvr32.exe /s wups2.dll
    regsvr32.exe /s wuweb.dll
    regsvr32.exe /s qmgr.dll
    regsvr32.exe /s qmgrprxy.dll
    regsvr32.exe /s wucltux.dll
    regsvr32.exe /s muweb.dll
    regsvr32.exe /s wuwebv.dll
  7. Reset Winsock settings:
    netsh winsock reset
  8. Reset system proxy settings:
    netsh winhttp reset proxy
  9. Optional. When using a local WSUS server, you can also reset the current binding of a client to the WSUS server by deleting the following parameters in the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate:
    REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f
    REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f
    REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
    REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v TargetGroup /f
    REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f
    REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f
  10. Start the previously stopped services:

    sc.exe config wuauserv start= auto
    sc.exe config bits start= delayed-auto
    sc.exe config cryptsvc start= auto
    sc.exe config TrustedInstaller start= demand
    sc.exe config DcomLaunch start= auto
    net start bits
    net start wuauserv
    net start appidsvc
    net start cryptsvc
  11. Optional. In some cases, you’ll need to install/reinstall the version of Windows Update Agent (WUA). You can check the current Windows Update Agent Wuaueng.dll file version on your computer with PowerShell:
    ((Get-Item $Env:windir\system32\Wuaueng.dll).VersionInfo).ProductVersion
    You can download the latest version of Windows Update agent here: https://support.microsoft.com/en-us/kb/949104.
    Windows 8.1 – 7.9.9600
    Windows 8 – 7.8.9200.16693
    Windows 7 – 7.6.7600.256
    Download latest windows update agent Use the following commands to force reinstall the Windows Update Agent: Windows 7 x86: WindowsUpdateAgent-7.6-x86.exe /quiet /norestart /wuforce
    Windows 7 x64: WindowsUpdateAgent-7.6-x64.exe /quiet /norestart /wuforce

Now you only have to restart your computer and run synchronization with Windows Update or WSUS.

wuauclt /resetauthorization /detectnow

Then go to the Windows Update and make sure that there are no errors while checking, downloading, and installing the updates.

The reset_windows_update_agent.bat script can be downloaded following this link reset_windows_update_agent.zip (options 9 and 11 are not included in the script since they are optional). Download the script, extract it, and run as an administrator.

reset windows update script: run as admin

If Windows updates are downloaded and installed correctly, you can remove the backup folders:

Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
Ren %systemroot%\system32\catroot2 catroot2.bak

If all else fails, try to manually download and install the latest cumulative update for your Windows version from the Microsoft Update Catalog.

3 comments
6
Facebook Twitter Google + Pinterest
previous post
How to Disable or Remove the Microsoft Wi-Fi Direct Virtual Adapter in Windows
next post
Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell

Related Reading

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Remove ‘Your License isn’t Genuine’ Banner in MS...

April 21, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

3 comments

spuortgs November 26, 2020 - 7:33 pm

thx, i **cked up my windows doing that.

Reply
srge March 13, 2024 - 9:56 am

In my case, the WUSA installer got stuck on copying packages to the Windows Update cache. This is resolved by using the command to reset the Windows Update components:
Reset-WUComponents –verbose

Reply
dk March 17, 2024 - 3:14 pm

Thanks! In my case, resetting the SoftwareDistribution and catroot2 folders helped to get rid of the high CPU usage and memory leak from the Svchost.exe (wuauserv) process. After installing the latest Windows 10 update, the wuauserv process started using more than 50% of the available RAM.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Delete Old User Profiles in Windows
  • Configuring Port Forwarding in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top