Sunday, 24 February 2019

Most of the times, we face issues with Windows updates. There are several error codes related to Windows updates and most of the times, they get fixed by running Windows Update troubleshooter. But sometimes, if the Windows update components get corrupted, we need to reset the Windows update component to default by performing some manual actions which include running commands to reset windows update components. In this article, I will mention the steps to reset the Windows Update component to default:

1. Windows Updates work properly if three windows services work properly. These three services are Background Intelligent Transfer Service, Windows Update and Cryptographic Services. There are a few more services that are responsible for proper functioning of Windows updates but we won't have to worry about them. So the first task would be, disabling these services. To disable these services, open cmd with admin rights and run the following commands:net stop bitsnet stop wuauservnet stop appidsvcnet stop cryptsvc2. Next step is, to delete the qmgr*.dat files. In order to do so, run the following command in elevated command prompt window:Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
(This step can be skipped if you are trying to resolve the windows updates issues for the first time. This step is suggested to be used only if everything has failed and you have no option left to troubleshoot windows updates issue)

3. SoftwareDisribution and Catroot2 folders store the downloaded update files and some old unwanted cache also remains in these folders. So we will rename these folders and will create new copies of these folders now. To do so, run the following commands in elevated command prompt window:Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bakRen %systemroot%\system32\catroot2 catroot2.bak

4. Now we need to reset the BITS service and the Windows Update service to the default security descriptor. To do so, run the following commands in elevated command prompt:
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)

6. Now we need to delete the incorrect registry values. To do so, open registry editor by running regedit in the Run box and locate the path HKEY_LOCAL_MACHINE\COMPONENTS
Now in the right pane, delete the following keys and restart your computer:PendingXmlIdentifierNextQueueEntryIndexAdvancedInstallersNeedResolving
Note: If these are not available in your Windows registry, skip this step.

7. Now reset the Winsock by running the following command:netsh winsock reset

8. Now we need to start the Background Intelligent Transfer Service, Windows Update and Cryptographic Services. To do so, run the following commands in elevated command prompt window:net start bitsnet start wuauservnet start appidsvcnet start cryptsvc