Windows Update Reset Windows Update in Windows 11


  • Staff
Windows_Update_banner.png

Windows Update keeps Windows 11 updated by automatically downloading and installing the latest updates, drivers, and hotfixes released by Microsoft.

Sometimes you may have an issue with Windows Update such as not being able to download or install updates, error messages, not being able to search for new updates, pending updates issue, etc. These kind of issues can occur when the Windows Update database or components are corrupted, one or more services related to Windows Update are not running, etc.

Resetting the Windows Update components can usually solve these types of issues.

See also:

This tutorial will show you how to completely reset Windows Update components and policies to default in Windows 11.


You must be signed in as an administrator to reset Windows Update.

Resetting Windows Update will not clear Windows Update history.



EXAMPLE: Windows Update

Windows_Update.png



Here's How:

1 Click/tap on the Download button below to download the .bat file below.

Reset_Reregister_Windows_Update_Components_for_Windows11.bat


(Content of BAT file for reference)
Code:
@echo off

:: Prompt to Run as administrator
Set "Variable=0" & if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive%  >nul 2>&1 && goto :(Privileges_got)
If "%1"=="%Variable%" (echo. &echo. Please right-click on the file and select &echo. "Run as administrator". &echo. Press any key to exit. &pause>nul 2>&1& exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%Variable%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs" & exit
:(Privileges_got)

:: Checking and Stopping the Windows Update services
set b=0

:bits
set /a b=%b%+1
if %b% equ 3 (
   goto end1
)
net stop bits
echo Checking the bits service status.
sc query bits | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
    goto bits
)
goto loop2

:end1
cls
echo.
echo Cannot reset Windows Update since "Background Intelligent Transfer Service" (bits) service failed to stop. Please restart the computer, and try again.
echo.
pause
goto Start


:loop2
set w=0

:wuauserv
set /a w=%w%+1
if %w% equ 3 (
   goto end2
)
net stop wuauserv
echo Checking the wuauserv service status.
sc query wuauserv | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
    goto wuauserv
)
goto loop3

:end2
cls
echo.
echo Cannot reset Windows Update since "Windows Update" (wuauserv) service failed to stop. Please restart the computer, and try again.
echo.
pause
goto Start



:loop3
set c=0

:cryptsvc
set /a c=%c%+1
if %c% equ 3 (
   goto end4
)
net stop cryptsvc
echo Checking the cryptsvc service status.
sc query cryptsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
    goto cryptsvc
)
goto Reset

:end4
cls
echo.
echo Cannot reset Windows Update since "Cryptographic Services" (cryptsvc) service failed to stop. Please restart the computer, and try again.
echo.
pause
goto Start


:Reset
Ipconfig /flushdns
del /s /q /f "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
del /s /q /f "%ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr*.dat"
del /s /q /f "%SYSTEMROOT%\Logs\WindowsUpdate\*"


if exist "%SYSTEMROOT%\winsxs\pending.xml.bak" del /s /q /f "%SYSTEMROOT%\winsxs\pending.xml.bak"
if exist "%SYSTEMROOT%\winsxs\pending.xml" (
    takeown /f "%SYSTEMROOT%\winsxs\pending.xml"
    attrib -r -s -h /s /d "%SYSTEMROOT%\winsxs\pending.xml"
    ren "%SYSTEMROOT%\winsxs\pending.xml" pending.xml.bak
)
 
if exist "%SYSTEMROOT%\SoftwareDistribution\DataStore.bak" rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution\DataStore.bak"
if exist "%SYSTEMROOT%\SoftwareDistribution\DataStore" (
    attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution\DataStore"
    ren "%SYSTEMROOT%\SoftwareDistribution\DataStore" DataStore.bak
)

if exist "%SYSTEMROOT%\SoftwareDistribution\Download.bak" rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution\Download.bak"
if exist "%SYSTEMROOT%\SoftwareDistribution\Download" (
    attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution\Download"
    ren "%SYSTEMROOT%\SoftwareDistribution\Download" Download.bak
)
 
if exist "%SYSTEMROOT%\system32\Catroot2.bak" rmdir /s /q "%SYSTEMROOT%\system32\Catroot2.bak"
if exist "%SYSTEMROOT%\system32\Catroot2" (
    attrib -r -s -h /s /d "%SYSTEMROOT%\system32\Catroot2"
    ren "%SYSTEMROOT%\system32\Catroot2" Catroot2.bak
)
 

:: Reset Windows Update policies
reg delete "HKCU\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate" /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate" /f
gpupdate /force


:: Reset the BITS service and the Windows Update service to the default security descriptor
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)


:: Reregister the BITS files and the Windows Update 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 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
netsh winsock reset
netsh winsock reset proxy

:: Set the startup type as automatic
sc config wuauserv start= auto
sc config bits start= auto
sc config DcomLaunch start= auto

:Start
net start bits
net start wuauserv
net start cryptsvc

:: Restart computer
cls
echo It is required to restart the computer to finish resetting Windows Update.
echo.
echo Please save and close anything open now, before the computer is restarted.
echo.
pause
echo.
echo.
echo.
echo *** Restart computer now. ***
echo.
pause
shutdown /r /f /t 0

2 Save the .bat file to your desktop.

3 Unblock the .bat file.

4 Run the .bat file.

5 If prompted by UAC, click/tap on Yes to approve run as administrator.

6 When resetting Windows Update has finished you will be prompted to Please save and close anything open now, before the computer is restarted., and press any key to continue when ready. (see screenshot below)

If a service fails to stop after 3 attempts, the .bat file will automatically end with a "Failed to reset Windows Update" message and prompt to press a key to continue.

When a key is pressed, the .bat file will then restart any service it had stopped before closing the command prompt.


7 You will now be prompted to press any key to Restart computer now.

This will immediately restart the computer. Save and close anything open before continuing.

It is important to restart the computer immediately after running the .bat file to apply without opening anything else.



Reset_Windows_Update_command.png



That's it,
Shawn Brink


 

Attachments

  • Windows_Update.jpg
    Windows_Update.jpg
    18.9 KB · Views: 86
  • Reset_Reregister_Windows_Update_Components_for_Windows11.bat
    5.9 KB · Views: 220
Last edited:

ICIT2LOL

Well-known member
Member
VIP
Local time
5:02 PM
Posts
1,702
Location
Central West NSW Australia
Visit site
OS
Windows 11 Pro Build 22H2
Hello Shawn mate having great difficulties with downloading some particular updates namely KB5008353 (error 0x80073701) have tried all sorts of solutions that have been suggested and have just now tried to download your bat file but it will not do so. Any suggestions please? No hurry as I am just about to go offline for a while. As a by the by the security updates do download and install no problem and just so you know I am running the version that can be run on unsupported hardware.
 

My Computer

System One

  • OS
    Windows 11 Pro Build 22H2
    Computer type
    Laptop
    Manufacturer/Model
    Asus
    CPU
    i7 -10510U
    Motherboard
    Asus
    Memory
    Samsung 16GB DDR4 2666 MHz
    Graphics Card(s)
    On board Intel
    Sound Card
    N/a
    Monitor(s) Displays
    Genaric
    Hard Drives
    Samsung 970 Pro NMe
    PSU
    N/A
    Case
    N/A
    Cooling
    Asus in built
    Keyboard
    Generic
    Mouse
    Logitec Wireless
    Internet Speed
    50MB max
    Browser
    Edge

zbook

Well-known member
Power User
VIP
Local time
1:02 AM
Posts
1,379
Visit site
OS
Windows 10
(error 0x80073701)

For the above error please run:






0x80073701​

MessageDescriptionMitigation
ERROR_SXS_ASSEMBLY_MISSING; The referenced assembly could not be found.Typically, a component store corruption caused when a component is in a partially installed state.Repair the component store with Dism RestoreHealth command or manually repair it with the payload from the partially installed component. From an elevated command prompt, run these commands:
DISM /ONLINE /CLEANUP-IMAGE /SCANHEALTH
DISM /ONLINE /CLEANUP-IMAGE /CHECKHEALTH
DISM /ONLINE /CLEANUP-IMAGE /RESTOREHEALTH
Sfc /Scannow

Restart the device.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    Motherboard
    Product : 190A Version : KBC Version 94.56
    Memory
    16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
    Graphics Card(s)
    NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
    Sound Card
    IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
    Hard Drives
    Model Hitachi HTS727575A9E364
    Antivirus
    Microsoft Defender
    Other Info
    Mobile Workstation

bbainfo

Member
Local time
3:02 AM
Posts
1
Visit site
OS
Windows 11
For the above error please run:






0x80073701​

MessageDescriptionMitigation
ERROR_SXS_ASSEMBLY_MISSING; The referenced assembly could not be found.Typically, a component store corruption caused when a component is in a partially installed state.Repair the component store with Dism RestoreHealth command or manually repair it with the payload from the partially installed component. From an elevated command prompt, run these commands:
DISM /ONLINE /CLEANUP-IMAGE /SCANHEALTH
DISM /ONLINE /CLEANUP-IMAGE /CHECKHEALTH
DISM /ONLINE /CLEANUP-IMAGE /RESTOREHEALTH
Sfc /Scannow

Restart the device

Hi,
Where did you get that table with mitigation steps??

Thanks!
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Build myself
    CPU
    Core i5 12600K
    Motherboard
    Asus Prime Z690M-Plus D4
    Memory
    DDR4 32 GB 3200Mhz GSkill
    Graphics Card(s)
    Geforce GTX 3060 TI
    Monitor(s) Displays
    Acer VG270S
    Screen Resolution
    1080p
    Hard Drives
    1TB SSD NVMe WD Blue
    512 GB SSD Sata Crucial MX500
    PSU
    Zalman Zm750-hp Plus 750W
    Case
    Corsair Carbide 275Q Quiet Gaming Case
    Cooling
    Air Cooler DeepCool AS500 RGB 140mm
    Keyboard
    Sharkoon Skiller Mech 3
    Mouse
    Logitech G502 Hero
    Internet Speed
    200 Mbps
    Browser
    Edge Chromium
    Antivirus
    Microsoft Defender

zbook

Well-known member
Power User
VIP
Local time
1:02 AM
Posts
1,379
Visit site
OS
Windows 10
It was more than two weeks ago and I no longer remember the source.
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    Motherboard
    Product : 190A Version : KBC Version 94.56
    Memory
    16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
    Graphics Card(s)
    NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
    Sound Card
    IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
    Hard Drives
    Model Hitachi HTS727575A9E364
    Antivirus
    Microsoft Defender
    Other Info
    Mobile Workstation

savvasradevic

New member
Local time
7:02 AM
Posts
1
Visit site
OS
Windows 11, Linux Ubuntu
Sorry to reply so late, but I had to thank you for the solution described above.

The original link was from here:
 

Attachments

  • listoferrors-and-solutions.pdf
    1.8 MB · Views: 8

My Computer

System One

  • OS
    Windows 11, Linux Ubuntu

rseiler

Member
VIP
Local time
11:02 PM
Posts
67
Visit site
OS
Windows 11
Thanks for the batch, it's the most comprehensive that I've seen.

Question: is anything that it does related to Windows Update "cookies," as in resetting/renewing them? Because I want to do that but can't find any documentation about where they are or how (surely this is unrelated to Edge cookies, because that would be ridiculous). Maybe it's just poor terminology.

Reference:

My Get-WindowsUpdateLog shows 0x80244007, and WU unfortunately can see nothing beyond Defender updates. It is unrelated to WSUS in my case, as I'm not using it.
 

My Computer

System One

  • OS
    Windows 11

Brink

Administrator
Staff member
MVP
Thread Starter
Local time
1:02 AM
Posts
8,355
Visit site
OS
Windows 11 Pro for Workstations
Thanks for the batch, it's the most comprehensive that I've seen.

Question: is anything that it does related to Windows Update "cookies," as in resetting/renewing them? Because I want to do that but can't find any documentation about where they are or how (surely this is unrelated to Edge cookies, because that would be ridiculous). Maybe it's just poor terminology.

Hello mate, :alien:

The BAT doesn't affect cookies, but it's not going to hurt anything to see if it may help with the error or not.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    1TB Samsung 980 PRO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Motorola MB8611 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S20 Ultra 5G phone
  • Operating System
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1
    CPU
    i7-1065G7 3.9 GHz
    Memory
    16 GB LPDDR4-3200
    Graphics card(s)
    Intel Iris Plus
    Sound Card
    Intel SST
    Monitor(s) Displays
    13.3" 4K UWVA AMOLED multitouch
    Screen Resolution
    3840 x 2160
    Hard Drives
    512 GB PCIe NVMe M.2 SSD
    Browser
    Google Chrome
    Antivirus
    Windows Defender and Malwarebytes Premium

rseiler

Member
VIP
Local time
11:02 PM
Posts
67
Visit site
OS
Windows 11
@Brink Yeah, I forgot to mention that I have used it but it has no effect on whatever this is. I'm only surmising that WU cookies are at play based on the MS article for the number, but there could easily be other reasons.

Update: Just wanted to include here that the solution was not to think of problems with WU itself (which is what the batch would address) but what could be stopping it from looking in the right place. The WU log turned out to have a more relevant error, 0x8007051F, which suggested a problem with the connection to Azure Active Directory. That's resolved by the procedure mentioned here, which in turn allowed the PC to actually see WU again. An edge case of edge cases.
 
Last edited:

My Computer

System One

  • OS
    Windows 11

Latest Support Threads

Top Bottom