NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

@ECHO OFF
echo .
echo Simple Script to reset Windows updates components by Your Windows Guide.
PAUSE
echo .
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 Please run the script as administartor by right clicking the WuReset file or your BITS service isn't responding.
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
echo Deleting *.qmgr files
del /s /q /f "%ALLUSERSPROFILE%MicrosoftNetworkDownloaderqmgr*.dat"
del /s /q /f "%ALLUSERSPROFILE%Application DataMicrosoftNetworkDownloaderqmgr*.dat"


echo Removing Windows update cache files....
echo .

cd /d %windir%system32

if exist "%SYSTEMROOT%winsxspending.xml.bak" del /s /q /f "%SYSTEMROOT%winsxspending.xml.bak"
if exist "%SYSTEMROOT%winsxspending.xml" (
takeown /f "%SYSTEMROOT%winsxspending.xml"
attrib -r -s -h /s /d "%SYSTEMROOT%winsxspending.xml"
ren "%SYSTEMROOT%winsxspending.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%system32Catroot2.bak" rmdir /s /q "%SYSTEMROOT%system32Catroot2.bak"
if exist "%SYSTEMROOT%system32Catroot2" (
attrib -r -s -h /s /d "%SYSTEMROOT%system32Catroot2"
ren "%SYSTEMROOT%system32Catroot2" 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
)

echo Resetting Update services secuirty descriptors
echo .
sc.exe sdset wuauserv D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
sc.exe sdset bits D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
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)

echo Re-registering Windows update files

cd /d %SYSTEMROOT%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

echo Resetting Winsock and Proxy
echo .
netsh winsock reset
netsh winsock reset proxy

echo Resetting the services as automatic
echo .

sc.exe config wuauserv start= auto
sc.exe config bits start= delayed-auto
sc.exe config cryptsvc start= auto
sc.exe config TrustedInstaller start= demand
sc.exe config DcomLaunch start= auto

:Start
echo Starting services
echo .
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
echo Task completed sucessfully!Please restart your computer and check for the updates again.
PAUSE
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.