Supported OS: Windows 7, 8, 10, and Server 2012 R2.
This article will help you to reset Windows update agent and configuration. Solution given below will fix Windows Update issues.
Please take necessary precautions before starting the reset process
Open Command prompt as administrator (elevated privilege) and then enter these commands one by one.
1. Stop services related to Windows update.
net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
2. Remove Query Manager data file
del "%allusersprofile%\Application Data\Microsoft\Network\Downloader*.dat"
3. Rename Software Distribution Folder
rename c:\windows\SoftwareDistribution SoftwareDistribution.bak
4. Remove Windows Update log
del "%systemroot%\WindowsUpdate.log"
5. Move Catroot folder
md %systemroot%\system32\catroot2.old
xcopy %systemroot%\system32\catroot2 %systemroot%\system32\catroot2.old /s
6. Reset Windows Update Services to default configuration
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)
7. Re-register DLLs
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
8. Remove WSUS client settings from registry
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
9. Resetting WinSock
netsh winsock reset
netsh winhttp reset proxy
10. Verify Integrity of System Files
Verify the integrity of system files by running DISM & SFC commands- Read here
11. Install this Windows Update- KB2937636
KB2937639 fixes several issues related to Windows Update agent/client. It installs/replaces these EXEs and DLLs files with latest ones.
wuapi.dll |
wuapp.exe |
wuauclt.exe |
wuaueng.dll |
wucltux.dll |
wudriver.dll |
wups.dll |
wups2.dll |
wuwebv.dll |
Check your Operating System version and download appropriate version from the Microsoft’s URLs given below. Install KB2937636 with administrator power.
12. Restart all services related
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
13. Update Group Policy Settings (For enterprise systems with AD)
gpupdate /force
13. Re-register Windows client/server
wuauclt /resetauthorization /detectnow
14. Restart your computer
Components and configuration of Windows update agent has been reset. Now restart your computer and try Windows update.
Alternatively you can run these commands using a Windows batch file
Open notepad application in your computer and Copy these commands given below and paste it into notepad, then save it as “WindowsUpdateReset.bat”. After saving, locate that file and then right click -> Run as administrator.
@echo off
net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
del "%allusersprofile%\Application Data\Microsoft\Network\Downloader*.dat"
rename c:\windows\SoftwareDistribution SoftwareDistribution.bak
del "%systemroot%\WindowsUpdate.log"
md %systemroot%\system32\catroot2.old
xcopy %systemroot%\system32\catroot2 %systemroot%\system32\catroot2.old /s
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)
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
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
netsh winsock reset
netsh winhttp reset proxy
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
gpupdate /force
wuauclt /resetauthorization /detectnow
Windows Update Troubleshooting and reset tools
References
- Windows Update additional resources https://docs.microsoft.com/en-us/windows/deployment/update/windows-update-resources
- How do I reset Windows Update components?: https://support.microsoft.com/en-us/kb/971058.
- Repair missing or corrupted system files: https://support.microsoft.com/en-us/kb/929833.
- Fix Windows Update errors by using System Update Readiness tool: https://support.microsoft.com/en-us/kb/947821.
- Windows reset tool TenForums.com https://www.tenforums.com/tutorials/24742-reset-windows-update-windows-10-a.html
- Manual Windows update reset guide: https://www.ebugg-i.com/windows/how-to-fix-windows-update-issues/