Introduction :
I have come across a problem, on a number of occasions, where PCs under my control fail to load new updates successfully. This is true whether they are attempting to apply via the Automatic Updates facility built into the OS or whether accessing the MS Update site directly.
Reason :
The problem is often associated with DLL files not being correctly set up for some reason. Most of the suggested fixes involve registering a list of DLL files on the PC manually. One cause of this I'm aware of in more detail is that whenever you need to use the Repair facility (Boot from an original XP Install CD and choose this option) this is likely to be a side-effect (At least from XP SP2).
Solution(s) :
I will include a couple of CMD files that do the fix for you. The XP version seems to work OK for Windows 2000 as well, but the 2003 version has not yet been tested (I've not come across the problem on any 2003 servers).
Although they mainly reflect the info found in the two links (
http://support.microsoft.com/kb/943144 for Windows XP &
http://support.microsoft.com/kb/555989 for Windows Server 2003), other files may have been added over time to cover more cases.
Where I have used "@ECHO ON" near the top to show what's going on during execution, you can change this to "@ECHO OFF" if you'd like it to run silently or secretively.
MSUpdateFixXP.Cmd :
- @Rem http://support.microsoft.com/kb/943144
-
-
@ECHO ON
-
IF .%1 == ./? GOTO HELP
-
IF .%1 == .HELP GOTO HELP
-
IF .%1 == .help GOTO HELP
-
GOTO MAIN
-
-
:HELP
-
ECHO Usage (for XP PCs): MSUpdateFixXP
-
ECHO This CMD script should re-enable a PC
-
ECHO to use Windows Update if it's failing.
-
ECHO This typically occurs after a REPAIR is done
-
ECHO from the original XP install CD.
-
GOTO ENDSCRIPT
-
-
:MAIN
-
REGSVR32 /S %WinDir%\System32\Wuapi.Dll
-
REGSVR32 /S %WinDir%\System32\wups.Dll
-
REGSVR32 /S %WinDir%\System32\Wuaueng.Dll
-
REGSVR32 /S %WinDir%\System32\Wucltui.Dll
-
REGSVR32 /S %WinDir%\System32\Msxml3.Dll
-
-
NET STOP WUAUSERV >NUL
-
IF NOT ERRORLEVEL 1 GOTO CONTINUE1
-
ECHO WUAUSERV (Windows Update & Automatic Service) failed to stop.
-
GOTO ENDSCRIPT
-
-
:CONTINUE1
-
REGSVR32 /S %WinDir%\System32\Wups2.Dll
-
-
:ENDSCRIPT
-
NET START WUAUSERV >NUL
-
ECHO ON
MSUpdateFix2003.Cmd :
PS :
I can't guarantee this will fix all situations, but I would be interested to hear if this fails to execute for any reason.