Fixing Windows Update errors

The ultimate .bat-file for completely resetting and fixing all sorts of stupid Windows Update errors.

Stuff the following into a .bat-file and run it

regsvr32 /u softpub.dll /s
regsvr32 /u wintrust.dll /s
regsvr32 /u initpki.dll /s
regsvr32 /u dssenh.dll /s
regsvr32 /u rsaenh.dll /s
regsvr32 /u gpkcsp.dll /s
regsvr32 /u sccbase.dll /s
regsvr32 /u slbcsp.dll /s
regsvr32 /u mssip32.dll /s
regsvr32 /u cryptdlg.dll /s
regsvr32 SOFTPUB.DLL /s
regsvr32 INITPKI.DLL /s
regsvr32 MSSIP32.DLL /s
regsvr32 wintrust.dll /s
regsvr32 regwizc.dll /s
regsvr32 licdll.dll /s

net stop cryptsvc 
cd %systemroot%\system32 
ren catroot2 catroot2old 
net start cryptsvc

net stop wuauserv 
cd %systemroot% 
ren SoftwareDistribution SoftwareDistributionOld
net start wuauserv

Reboot and retry the updates. If everything works, go into C:\Windows and delete SoftwareDistributionOld, then go into system32 and delete catroot2old. Otherwise, rename them back to their original names. No harm done.

Leave a Reply

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