Skip to content

Instantly share code, notes, and snippets.

@jpswade
Created January 19, 2016 12:11
Show Gist options
  • Save jpswade/6dbafebfe5c698c4635c to your computer and use it in GitHub Desktop.
Save jpswade/6dbafebfe5c698c4635c to your computer and use it in GitHub Desktop.
Fixes for Windows AutoUpdates
@ECHO off
ECHO Fixes for Windows AutoUpdates
ECHO @see http://support.microsoft.com/kb/971058
ECHO By @jpswade
PAUSE
ECHO Updating the time...
W32TM /config /update /syncfromflags:manual /manualpeerlist:"time-b.nist.gov,0x8"
ECHO Stopping the services...
NET stop bits
NET stop wuauserv
ECHO Cleaning up files...
DEL "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
REN %systemroot%\SoftwareDistribution\DataStore *.bak
REN %systemroot%\SoftwareDistribution\Download *.bak
REN %systemroot%\system32\catroot2 *.bak
ECHO Reset BITS and Windows Update services...
SC sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
ECHO Reinstall
RUNDLL32 setupapi.dll,InstallHinfSection DefaultInstall 132 C:\WINDOWS\inf\au.inf
RUNDLL32 setupapi.dll,InstallHinfSection DefaultInstall 132 C:\WINDOWS\inf\qmgr.inf
ECHO Registering dlls...
CD /d %windir%\system32
REGSVR32 /s atl.dll
REGSVR32 /s urlmon.dll
REGSVR32 /s mshtml.dll
REGSVR32 /s shdocvw.dll
REGSVR32 /s browseui.dll
REGSVR32 /s jscript.dll
REGSVR32 /s vbscript.dll
REGSVR32 /s scrrun.dll
REGSVR32 /s msxml.dll
REGSVR32 /s msxml3.dll
REGSVR32 /s msxml6.dll
REGSVR32 /s actxprxy.dll
REGSVR32 /s softpub.dll
REGSVR32 /s wintrust.dll
REGSVR32 /s dssenh.dll
REGSVR32 /s rsaenh.dll
REGSVR32 /s gpkcsp.dll
REGSVR32 /s sccbase.dll
REGSVR32 /s slbcsp.dll
REGSVR32 /s cryptdlg.dll
REGSVR32 /s oleaut32.dll
REGSVR32 /s ole32.dll
REGSVR32 /s shell32.dll
REGSVR32 /s initpki.dll
REGSVR32 /s wuapi.dll
REGSVR32 /s wuaueng.dll
REGSVR32 /s wuaueng1.dll
REGSVR32 /s wucltui.dll
REGSVR32 /s wups.dll
REGSVR32 /s wups2.dll
REGSVR32 /s wuweb.dll
REGSVR32 /s qmgr.dll
REGSVR32 /s qmgrprxy.dll
REGSVR32 /s wucltux.dll
REGSVR32 /s muweb.dll
REGSVR32 /s wuwebv.dll
ECHO Reset winsock service...
NETSH reset winsock
ECHO Starting the services...
NET start WUAUSERV
NET start BITS
ECHO Fixing SSL/HTTPS...
SC config cryptsvc start= auto
NET stop cryptsvc
REN %systemroot%\System32\Catroot2 Catroot2-old
REGSVR32 cryptdlg.dll /s
REGSVR32 cryptui.dll /s
REGSVR32 dssenh.dll /s
REGSVR32 gpkcsp.dll /s
REGSVR32 initpki.dll /s
REGSVR32 mssip32.dll /s
REGSVR32 sccbase.dll /s
REGSVR32 softpub.dll /s
REGSVR32 slbcsp.dll /s
REGSVR32 rsaenh.dll /s
REGSVR32 winhttp.dll /s
REGSVR32 wintrust.dll /s
NET start cryptsvc
ECHO Run windows auto update detection...
WUAUCLT /detectnow
ECHO done!
ECHO Still not working? Try this:
ECHO http://download.microsoft.com/download/8/3/D/83DA9B2F-3246-4C1E-996B-1381F667247D/ResetWindowsUpdate.msi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment