Thursday 21 February 2008

XP : Windows Updates 'Stuck'

My work pc (xp, sp2) has automatic updates turned on (not my choice).
For the past few days I have had a some 'stuck' updates that just sit in my taskbar and won't install!

A quick google reveals I dont even need them :(
KB937060 and KB937061 are visual studio 2005 security updates for crystal reports, which I dont even have installed.

Anyway, the pc performed extremely badly whilst repeatedly failing to install these updates. A generic host process 'svchost.exe' was eating memory and periodically utilising 100% of processor time. Whilst trying to sort out the mess, I came across this script to reset Windows installer.

Steps -
1) Run this script (put in a .BAT file and run it).
2) Download essential updates from windowsupdate.com
3) Reboot

net stop wuauserv 
net stop bits
rmdir /s /q %windir%\SoftwareDistribution\
REGSVR32 WUAPI.DLL /s
regsvr32 wuaueng.dll /s
REGSVR32 WUAUENG1.DLL /s
REGSVR32 ATL.DLL /s
REGSVR32 WUCLTUI.DLL /s
REGSVR32 WUPS.DLL /s
REGSVR32 WUPS2.DLL /s
REGSVR32 WUWEB.DLL /s
net start bits
net start wuauserv
wuauclt.exe /resetauthorization /detectnow

No comments: