When Windows update service is not working properly, updates are not downloaded or installed, the easiest and most effective way to solve Windows update service problem is to restore the original settings. In this article, we will show you how to reset Windows Update Agent and service settings.
Satisfied:
- Using Windows Update Troubleshooter to Fix Update Issues
- Reset Windows Update Client with PowerShell
- Using the Windows Update Tool to Reset
- Reset Windows Update Settings from Command Prompt
Normally, to debug Windows Update errors, an administrator needs to find the error codes in the%windir%\WindowsUpdate.logFile (in Windows 10 you can use WindowsUpdate.logThis way). The number of possible errors an administrator can find when analyzing the Windows update log is in the tens (a complete list of Windows update errors) and the process to solve them is not trivial. To avoid wasting time and effort, it's much easier to completely reset the Windows Update service and agent to their default state.
Using Windows Update Troubleshooter to Fix Update Issues
Before proceeding with resetting Windows Update settings, we strongly recommend that you first try a simpler and quite effective tool to fix problems with the Windows Update service automatically using the built-in.Windows Update Troubleshooter.
Windows Update Troubleshooter is already integrated into the modern settings panel of Windows 10 and 11. For older versions of Windows, you need to download them manually:
- ventanas11— Settings -> System -> Troubleshooting -> Other Troubleshooters -> Windows Update;
- windows 10– wu10.diagcab (https://aka.ms/wudiag) or run the local version of the tool: Start -> Settings -> Update & Security -> Troubleshoot -> Additional Troubleshooting -> Windows Updates (resolve problems that prevent Windows from updating);
For quick access you can use Windows Troubleshooting Toolsor ms-settings URI command:
MS Setup - Troubleshooting
- Windows 7 e Windows 8.1— WindowsUpdate.diagcab (https://aka.ms/diag_wu).
Wait for the Windows Update Troubleshooter to scan your system and try to fix all errors in Windows Update and related components automatically.
In my case, Windows Update database corruption was found and fixed. After that, you need to restart your computer and try to check for updates. If updates are not downloaded or installed, continue to the next step.
Reset Windows Update Client with PowerShell
You can usedas PSWindowsUpdate PowerShell-Modulto reset the Windows Update agent and service.
Install the PSGallery script gallery module on your computer:
Install-Module-Name PSWindowsUpdate
make it possibleExecutando scripts do PowerShell:
Establecer-ExecutionPolicy –ExecutionPolicy RemoteSigned -force
Run the command:
Reset-WUComponents - verbose
The Reset-WUComponents command stops services, re-registers DLLs, cleans up the C:\Windows\SoftwareDistribution folder, etc. The complete record 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 filesStep 3: Copy the securityVERBOSE software distribution folder : Rename the Software Distribution folder to C:\Windows\SoftwareDistribution.bakVERBOSE: Rename the CatRoot folder to C:\Windows\System32\Catroot2.bakStep 4: Delete the old Windows Update VERBOSE logs: Delete the C:\ files Windows\WindowsUpdate.log. Step 5: Reset Windows Update ServicesVERBOSE: Reset BITSVERBOSE Service: Reset Windows Update ServiceStep 6: Reregister DLLVERBOSE: regsvr32.exe /s atl.dllVERBOSE: regsvr32.exe /s urlmon.dllVERBOSE: regsvr32 .exe /s mshtml .dllVERBOSE: regsvr32.exe /s shdocvw.dllVERBOSE: regsvr32.exe /s browserui.dllVERBOSE: regsvr32.exe /s jscript.dllVERBOSE: regsvr32.exe /s vbscript.dllVERBOSE: regsvr32.exe /s scrrun .dllVERBOSE: regsvr32 . exe /s msxml.dllVERBOSE: regsvr32.exe /s msxml3.dllVERBOSE: regsvr32.exe /s msxml6.dllVERBOSE: regsvr32.exe /s actxprxy.dllVERBOSE: regsvr32.exe /s softpub.dllVERBOSE: regsvr32.exe /s wintrust . dllVERBOSE: regsvr32 .exe /s wintrust.dll .exe /s dssenh.dllVERBOSE: regsvr32.exe /s rsaenh.dllVERBOSE: regsvr32.exe /s gpkcsp.dllVERBOSE: regsvr32.exe /s sccbase.dllVERBOSE: regsvr32.exe / s slbcsp .dllVERBOSE: regsvr32.exe /s cryptdlg .dllVERBOSE: regsvr32.exe /s oleaut32.dllVERBOSE: regsvr32.exe /s ole32.dllV ERBOSE:regsvr32.ex and /s shell32.d llVERBOSE:regsvr32.exe /s initpki.d llVERBOSE:regsvr32.exe /s wuapi.dllVERBOSE:regsvr32.exe /s wuaueng.dllVERBOSE:regsvr32.exe /s wuaueng1.dllVERBOSE:regsvr32 .exe /s wucltui .dllVERBOSE: regsvr32. exe /s wups.dllVERBOSE: regsvr32.exe /s wups2.dllVERBOSE: regsvr32.exe /s wuweb.dllVERBOSE: regsvr32.exe /s qmgr.dllVERBOSE: regsvr32.exe /s qmgrprxy .dllVERBOSE: regsvr32. exe /s wucltux.dllVERBOSE: regsvr32.exe /s muweb.dllVERBOSE: regsvr32.exe /s wuwebv.dllStep 7: Reset WinSockVERBOSE: netsh winsock resetStep 8: Reset ProxyVERBOSE: netsh winhttp reset ProxyStep 9: Start Windows Update ServicesVERBOSE: Services cryptographic (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
Check for updates in the Settings panel or use PowerShell to check for available Windows updates:
Get-WUListName
Using the Windows Update Tool to Reset
Reset Windows Update Toolis another useful and simple tool to reset Windows Update settings. This script was previously 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.
Offered to download either a compiled (C++) wureset.exe file or a regular batch script. I prefer the cmd script.
- Download theResetWUEng.zipand extract it;
- execute thoseResetWUEng.cmdas an administrator;
- The script detects your operating system version (in my example it's Windows 10) and offers 18 different options. Some of them are not directly related to resetting WU Agent settings, but they can be useful to fix various Windows issues (check disk withchkdsk,Repair Windows Image Using DISM, restart Winsock, delete temp files, etc.);
- To roll back Windows Update, using the option is usually enough2 - Reset Windows Update components.Press2YProhibited;
- The script will automatically perform all of the actions described below when performing a manual Windows Update Agent reset from the command line.
You can view the actions performed by the script by opening the ResetWUEng.cmd file in any text editor and examining its contents. For example, option 2 sends you to the: componentsFunction.
- After the Windows Update tool restart script completes, restart your computer and check for new updates.
The ResetWUEng.cmd script is universal and suitable for all versions of Windows from Windows XP to Windows 11.
Reset Windows Update Settings from Command Prompt
Resetting the Windows Update Agent and service configuration consists of several steps. All described operations are performed from the elevated command prompt. I added all the commands in a single bat file.
You can use this script to completely reset Windows Update settings and clear local update cache. The script applies to Windows 11/10/8.1/7 and Windows Server 2022/2019/2016/2012 R2/2008 R2 workstations. This script helps eliminate most of the typical Windows Update errors when Windows finishes downloading new updates or encounters errors during 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 toolorsop.msc
to see the resulting GPO settings. Or you can reset local GPO settings accordinglythis guide.
Let's see step by step what this script does:
- Stop Windows Update,POINTSand cryptographic services:
Netto-Stopbits
net stop wuauserv
neta stop appidsvc
net stop cryptsvc
taskkill /im wuauclt.exe /f - Delete the qmgr*.dat service files from the %ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\ folder:
Eliminar "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
- Rename system folders where configuration files and update cache are stored (can be used as backup if needed). After restarting the update service (
wauserv
), these directories will be automatically recreated:Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
Ren %systemroot%\system32\catroot2 catroot2.bak - Delete the old windowsupdate.log file:
del /f /s /q %windir%\windowsupdate.log
- Reset permissions on BITS and Windows Update Services (ifService permissions have 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:\ AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
sc.exe trusted sdset installer D:(A;;CCDCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S: . ( AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD) - Re-register BITS and Windows Update related DLL (Dynamic System Library) files:
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 browserui.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 - Reset winsock settings:
restablecer netsh winsock
- Reset system proxy settings:
netsh winhttp Restablecer proxy
- Optional. when you usea local WSUS serverYou can also reset a client's current binding to the WSUS server by deleting the following parameters in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate registry key:
REGISTRAR ELIMINAR "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f
REGISTRAR ELIMINAR "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f
REGISTRAR ELIMINAR "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
REGISTRAR ELIMINAR "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v TargetGroup /f
REGISTRAR ELIMINAR "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f
REGISTRAR ELIMINAR "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f - Start previously stopped services:
configuration sc.exe wuauserv start=auto
sc.exe Konfigurationsbits start=retrasado-auto
sc.exe configuration cryptsvc start = automatic
sc.exe config TrustedInstaller start=request
sc.exe config DcomLaunch start=auto
net start bits
wuauserv net start
net start appidsvc
start net cryptsvc Optional. In some cases, you need to install/reinstall Windows Update Agent (WUA) version. You can check the current version of the Windows Update Agent Wuaueng.dll file on your computer using PowerShell:
((Get-Item $Env:windir\system32\Wuaueng.dll).VersionInfo).Product Version
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
Use the following commands to force Windows Update Agent reinstallation: Windows 7 x86:WindowsUpdateAgent-7.6-x86.exe/quiet/norestart/wuforce
Win7x64:WindowsUpdateAgent-7.6-x64.exe/quiet/norestart/wuforce
Now all you have to do is restart your computer and sync with Windows Update or WSUS.
wuauclt /reset authorization /detect now
Then go to Windows Update and make sure there are no errors checking, downloading and installing updates.
Hereset_windows_update_agent.batThe script can be downloaded from this link.reset_windows_update_agent.zip(Options 9 and 11 are not included in the script because they are optional.) Download the script, extract it and run it as an administrator.
If Windows updates were successfully downloaded and installed, you can delete the backup folders:
Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
Ren %systemroot%\system32\catroot2 catroot2.bak
If all else fails, try thisManually download and install the latest cumulative updatefor your version of Windows in the Microsoft Update Catalog.