Home / Solution / Resetting Windows Update Agent Settings

Resetting Windows Update Agent Settings

In this text we’ll present the best way to repair widespread Windows Update errors by resetting Windows Update elements configuration. As a rule, it’s the simplest and the best method to clear up the problems with the Windows Update service if updates will not be downloaded or errors happen when putting in updates.

Usually, to debug Windows Update errors, an administrator wants to investigate the error codes within the log file %windir%WindowsUpdate.log (in Windows 10, you may get WindowsUpdate.log in ). The variety of doable errors that an administrator might encounter when analyzing the Windows replace log is dozens () and the method of resolving them is non-trivial. To keep away from undue efforts and waste no time, it’s a lot simpler to utterly reset Windows Update service and agent to the default state. After resetting Windows Update, you’ll be able to attempt to verify for updates.

Windows Update Troubleshooter Tool

Before continuing to reset the configuration of Windows Update, we strongly suggest that you simply first strive a less complicated and simpler instrument to mechanically repair issues within the Windows Update service with the assistance of Windows Update Troubleshooter Tool.

Download and run the Windows Update Troubleshooter in your Windows model:

  • Windows 10 – wu10.diagcab (https://aka.ms/wudiag) (or run the native model of the instrument: Start -> Settings -> Updates and Security -> Troubleshoot -> Windows Updates Troubleshooter);
  • Windows 7 and Windows eight.1 — WindowsUpdate.diagcab (https://aka.ms/diag_wu).

Wait for the Windows Update Troubleshooter to scan your system and mechanically try to repair all errors within the Windows Update and associated elements.

In my case, a corruption within the Windows Update database was discovered and stuck. After that, it stays to restart the pc and attempt to scan for updates. If updates will not be downloaded or put in, proceed to the following step.

Reset Windows Update Settings from the Command Line

The means of resetting Windows Update service and agent configuration consists of a number of steps. All the described operations are carried out within the elevated command immediate. I added all of the instructions in a single bat file (to obtain the prepared script, comply with the hyperlink beneath).

Using this script, you’ll be able to utterly reset the configuration of Windows Update and clear the native replace cache. The script is relevant for Windows 7, Windows eight.1, Windows 10 and Windows Server 2016/ 2012 R2/ 2008 R2. This script helps to get rid of nearly all of typical Windows Update errors, when Windows Update stops downloading new updates or errors seem throughout replace set up.

Let’s take into account what this script does step-by-step:

  1. Stop Windows Update , and cryptographic companies:
    internet cease bits
    internet cease wuauserv
    internet cease appidsvc
    internet cease cryptsvc
    taskkill /im wuauclt.exe /f
  2. Delete service information qmgr*.dat from the folder %ALLUSERSPROFILE%Application DataMicrosoftNetworkDownloader:
    Del "%ALLUSERSPROFILE%Application DataMicrosoftNetworkDownloaderqmgr*.dat"
  3. Rename system folders, during which configuration information and replace cache are saved (if crucial, they can be utilized as backups). After the WU companies are restarted the folders shall be mechanically created once more:
    Ren %systemrootpercentSoftwareDistribution SoftwareDistribution.bak
    Ren %systemrootpercentsystem32catroot2 catroot2.bak
  4. Delete the outdated windowsupdate.log file :
    del /f /s /q %windirpercentwindowsupdate.log
  5. Reset the permissions for BITS and Windows Update companies (if ):
    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 information of system dynamic libraries (dll) associated to BITS and Windows Update:
    cd /d %windirpercentsystem32
    regsvr32.exe /U /s vbscript.dll
    regsvr32.exe /U /s mshtml.dll
    regsvr32.exe /U /s msjava.dll
    regsvr32.exe /U /s msxml.dll
    regsvr32.exe /U /s actxprxy.dll
    regsvr32.exe /U /s shdocvw.dll
    regsvr32.exe /U /s Mssip32.dll
    regsvr32.exe /U /s wintrust.dll
    regsvr32.exe /U /s initpki.dll
    regsvr32.exe /U /s dssenh.dll
    regsvr32.exe /U /s rsaenh.dll
    regsvr32.exe /U /s gpkcsp.dll
    regsvr32.exe /U /s sccbase.dll
    regsvr32.exe /U /s slbcsp.dll
    regsvr32.exe /U /s cryptdlg.dll
    regsvr32.exe /U /s Urlmon.dll
    regsvr32.exe /U /s Oleaut32.dll
    regsvr32.exe /U /s msxml2.dll
    regsvr32.exe /U /s Browseui.dll
    regsvr32.exe /U /s shell32.dll
    regsvr32.exe /U /s atl.dll
    regsvr32.exe /U /s jscript.dll
    regsvr32.exe /U /s msxml3.dll
    regsvr32.exe /U /s softpub.dll
    regsvr32.exe /U /s wuapi.dll
    regsvr32.exe /U /s wuaueng.dll
    regsvr32.exe /U /s wuaueng1.dll
    regsvr32.exe /U /s wucltui.dll
    regsvr32.exe /U /s wups.dll
    regsvr32.exe /U /s wups2.dll
    regsvr32.exe /U /s wuweb.dll
    regsvr32.exe /U /s scrrun.dll
    regsvr32.exe /U /s msxml6.dll
    regsvr32.exe /U /s ole32.dll
    regsvr32.exe /U /s qmgr.dll
    regsvr32.exe /U /s qmgrprxy.dll
    regsvr32.exe /U /s wucltux.dll
    regsvr32.exe /U /s muweb.dll
    regsvr32.exe /U /s wuwebv.dll
    regsvr32.exe /s vbscript.dll
    regsvr32.exe /s mshtml.dll
    regsvr32.exe /s msjava.dll
    regsvr32.exe /s msxml.dll
    regsvr32.exe /s actxprxy.dll
    regsvr32.exe /s shdocvw.dll
    regsvr32.exe /s Mssip32.dll
    regsvr32.exe /s wintrust.dll
    regsvr32.exe /s initpki.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 Urlmon.dll
    regsvr32.exe /s Oleaut32.dll
    regsvr32.exe /s msxml2.dll
    regsvr32.exe /s Browseui.dll
    regsvr32.exe /s shell32.dll
    regsvr32.exe /s Mssip32.dll
    regsvr32.exe /s atl.dll
    regsvr32.exe /s jscript.dll
    regsvr32.exe /s msxml3.dll
    regsvr32.exe /s softpub.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 scrrun.dll
    regsvr32.exe /s msxml6.dll
    regsvr32.exe /s ole32.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 utilizing , you can too reset the present binding of a shopper to the WSUS server by deleting the next parameters within the registry key HKLMSOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdate:
    REG DELETE "HKLMSOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdate" /v AccountDomainSid /f
    REG DELETE "HKLMSOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdate" /v PingID /f
    REG DELETE "HKLMSOFTWAREMicrosoftWindowsCurrentVersionWindowsUpdate" /v SusClientId /f
    REG DELETE "HKLMSOFTWAREPoliciesMicrosoftWindowsWindowsUpdate" /v TargetGroup /f
    REG DELETE "HKLMSOFTWAREPoliciesMicrosoftWindowsWindowsUpdate" /v WUServer /f
    REG DELETE "HKLMSOFTWAREPoliciesMicrosoftWindowsWindowsUpdate" /v WUStatusServer /f
  10. Start the beforehand stopped companies:

    sc.exe config wuauserv begin= auto
    sc.exe config bits begin= delayed-auto
    sc.exe config cryptsvc begin= auto
    sc.exe config TrustedInstaller begin= demand
    sc.exe config DcomLaunch begin= auto
    internet begin bits
    internet begin wuauserv
    internet begin appidsvc
    internet begin cryptsvc
  11. Optional. In some instances you’ll want to put in/reinstall the latest model of Windows Update Agent (WUA). You can obtain the present model of Windows Update agent from this webpage https://help.microsoft.com/en-us/kb/949104. Download the file in your Windows model. To drive reinstall of the Windows Update Agent, run the next instructions: for Windows 7 x86: WindowsUpdateAgent-7.6-x86.exe /quiet /norestart /wuforce, for Windows 7 x64: WindowsUpdateAgent-7.6-x64.exe /quiet /norestart /wuforce
Tip. The present Windows Update Agent (WUA) model in your pc might be discovered within the properties of the %windirpercentsystem32Wuaueng.dll file. In our instance, it’s 7.6.7600.256.

Now you solely should restart your pc and run synchronization with Windows Update server / WSUS.

wuauclt /resetauthorization /detectnow

Then go to the Windows Update and guarantee that there aren’t any errors whereas checking, downloading and putting in the updates.

The script reset_windows_update_agent.bat might be downloaded following this hyperlink (choices 9 and 11 will not be included within the script since they’re elective). Download the script, unzip it and run with the administrator privileges.

If the updates are downloaded and put in accurately, you’ll be able to take away the backups:

Ren %systemrootpercentSoftwareDistribution SoftwareDistribution.bak
Ren %systemrootpercentsystem32catroot2 catroot2.bak

Script Reset Windows Update Agent

In the Technet script gallery there’s a slightly helpful and easy script to reset the Windows Update elements – Reset Windows Update Agent Tool. The script is common and appropriate for all variations of Windows: beginning with Windows XP and ending with the latest Windows 10 builds. Consider the best way to use it.

  1. Download the ResetWUEng.zip archive right here (https://gallery.technet.microsoft.com/scriptcenter/Reset-Windows-Update-Agent-d824badc) and unpack it;
  2. Run the ResetWUEng.cmd file with the administrator permissions;
  3. The script will detect your OS model (in my instance, it’s Windows 10) and can provide 18 completely different choices. Some of them don’t straight associated to the reset of WU agent settings, however could also be helpful for fixing varied Windows points (checking the disk with the chkdsk, fixing errors within the Windows picture, resetting Winsock, clearing momentary information, and so on.);
  4. To reset the Windows Update settings, it’s often ample to make use of the choice 2 – Resets the Windows Update Components. Press 2 and Enter;
  5. The script will mechanically carry out all of the actions that we described above when performing a guide reset of the Windows Update Agent from the command immediate;
    You can see the script carried out motion does by opening the ResetWUEng.cmd file in any textual content editor and analyzing its contents. For instance, choice 2 sends you to the :elements perform.
  6. After the completion of the Reset Windows Update Agent script, restart your pc and run scan for brand spanking new updates.

Check Also

Adding Third-Party Drivers into VMWare ESXi 6.7 ISO Image

In this text, we’ll think about add (inject) drivers into the ESXi 6.7 set up …

Leave a Reply

Your email address will not be published. Required fields are marked *