Reset Windows updates

Windows update is an Important component of Windows.By Windows updates one can get

  • new drivers for the hardware devices installed in the computer
  • security patches
  • known bugs fixed
  • Major updates and upgrades.

But due to some issues, generally related directly or Indirectly to some corruption in system files, windows update may not work properly.This discussion discusses resetting the Windows update completely using a reset script.

It does the following things:

  • Removes the older Windows update Folders, where the updates are downloaded.Newer ones are created automatically.
  • Re-registers the Windows update Files.
  • Resets your network connection.

Instructions for usage:

  1. Download the Script into your computer.
  2. At the location where it is saved, Right click and select Extract.
  3. After the extract is complete, you will see a WuReset.bat named File in the new windows that opens.
  4.  Unblock the .bat file.
  5. Right click WuReset.bat named file and select Run as administrator.
  6. Wait for the "Task completed successfully" message in the command Prompt Window.
  7. Restart your computer and check for the updates again.

For Users running Windows 10 build 10240 and later:

Download Windows update reset script for Computers running Windows 10

For users running Windows 7,8.0 or 8.1:
Download Windows update reset script for Windows 7 and 8

Alternatively, you can enter the following commands one by one(given in the code if downloading the reset script isn't working):

The code of the .BAT is as under

@echo off echo .

echo Simple script to reset windows update-Credits to shawn Brink for the commands

echo .

echo PAUSE 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 Failed to reset Windows Update due to bits service failing to stop. 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 Failed to reset Windows Update due to wuauserv service failing to stop. echo. pause goto Start :loop3 set app=0 :appidsvc set /a app=%app%+1 if %app% equ 3 ( goto end3 ) net stop appidsvc echo Checking the appidsvc service status. sc query appidsvc | findstr /I /C:"STOPPED" if not %errorlevel%==0 ( goto appidsvc ) goto loop4 :end3 cls echo. echo Failed to reset Windows Update due to appidsvc service failing to stop. echo. pause goto Start :loop4 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 Failed to reset Windows Update due to cryptsvc service failing to stop. echo. pause goto Start :Reset Ipconfig /flushdns del /s /q /f "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat" cd /d %windir%\system32 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.bak" rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution.bak" if exist "%SYSTEMROOT%\SoftwareDistribution" ( attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution" ren "%SYSTEMROOT%\SoftwareDistribution" SoftwareDistribution.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 ) if exist "%SYSTEMROOT%\WindowsUpdate.log.bak" del /s /q /f "%SYSTEMROOT%\WindowsUpdate.log.bak" if exist "%SYSTEMROOT%\WindowsUpdate.log" ( attrib -r -s -h /s /d "%SYSTEMROOT%\WindowsUpdate.log" ren "%SYSTEMROOT%\WindowsUpdate.log" WindowsUpdate.log.bak ) 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 regsvr32 /s wudriver.dll netsh winsock reset netsh winsock reset proxy :Start net start bits net start wuauserv net start appidsvc net start cryptsvc

echo Task completed succesfully!Please restart your computer and check for the updates again.


(The code of Script used for resetting Windows updates in Windows 7 and 8 is nearly the same)

(Inputs from Askvg+Tenforums)

Thing that might concern many:

This script might delete your update History, but not your Installed updates.Let us know how the resetting goes in the thread from where you were redirected.

 

Discussion Info


Last updated November 16, 2018 Views 243,986 Applies to:

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Thanks Sumit.

It appears to have been resolve.

Windows Updated worked correctly, and so did the Trouble Shooting which says 'Windows Update components must be repaired' with tag as 'fixed' and green tick mark.

Thanks again.

Glad to know this :)
Sumit
Windows Insider MVP 2018 and Volunteer Moderator

Dear Sumit,

After about 2 hours Windows updated, it got stuck (hang) at 46%.  And now again it is restarting the update from zero.

So it has worked?

:}

The W10 script worked perfectly for me, after many other suggestions failed. Thanks!

Windows update is an Important component of Windows.By Windows updates one can get

  • new drivers for the hardware devices installed in the computer
  • security patches
  • known bugs fixed
  • Major updates and upgrades.

But due to some issues, generally related directly or Indirectly to some corruption in system files, windows update may not work properly.This discussion discusses resetting the Windows update completely using a reset script.

It does the following things:

  • Removes the older Windows update Folders, where the updates are downloaded.Newer ones are created automatically.
  • Re-registers the Windows update Files.
  • Resets your network connection.

Instructions for usage:

  1. Download the Script into your computer.
  2. At the location where it is saved, Right click and select Extract.
  3. After the extract is complete, you will see a WuReset.bat named File in the new windows that opens.
  4. Right click WuReset.bat named file and select Run as administrator.
  5. Wait for the "Task completed successfully" message.
  6. Restart your computer and check for the updates again.

For Users running Windows 10 build 10240 and later:

Download Windows update Reset script

For users running Windows 7,8.0 or 8.1:

Download Windows update reset script for Windows 7 and 8

The code of the .BAT is as under

net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
Ipconfig /flushdns
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
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)
rmdir %systemroot%\SoftwareDistribution /S /Q
rmdir %systemroot%\system32\catroot2 /S /Q
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
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc

(The code of Script used for resetting Windows updates in Windows 7 and 8 is nearly the same)

(Inputs from Askvg+Tenforums)

This has not resolved my Error 0x80070643 for Update for Windows 10 Version 1511 for x64-based Systems (KB3122947) - Error 0x80248007. And this has screwed up my windows defender as well. I am unable to open windows defender after this script adding to the existing windows update problem.

Thanks

Manu

I wish I could say even one of these methods worked, but neither one did. Seems like I have tried everything. Thanks anyway. 
Start a new question and reply back with the address of it.I will help you better.
Sumit
Windows Insider MVP 2018 and Volunteer Moderator

Thank you forgetting back to me I have Downloaded WuReset .zip,I have not opened it at the moment because just looked and its updating and got to 13%,but if it plays up I will Run it,

Many Thanks Mick.

I tried the wureset and it failed stating system 5 eror occurred access denied. now what?

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.