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

  1. Create a restore point
  2. Backup Windows registry

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.

Download KB2937636 for Windows 8 x86-based Systems
Download KB2937636 for Windows 8 for x64-based Systems
Download KB2937636 for Windows 2012
Download KB2937636 for all supported x86-based versions of Windows 7 SP1
Download KB2937636 for all supported x64-based versions of Windows 7 SP1
Download KB2937636 for all supported x86-based versions of Windows Server 2008 R2 SP1
Download KB2937636 for all supported x64-based versions of Windows Server 2008 R2 SP1
Download KB2937636 for all supported Itanium-based versions of Windows Server 2008 R2 SP1

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