473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,385 developers and data experts.

Microsoft Update Not Working

NeoPa
32,556 Expert Mod 16PB
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 :
Expand|Select|Wrap|Line Numbers
  1. @Rem http://support.microsoft.com/kb/943144
  2.  
  3. @ECHO ON
  4. IF .%1 == ./? GOTO HELP
  5. IF .%1 == .HELP GOTO HELP
  6. IF .%1 == .help GOTO HELP
  7. GOTO MAIN
  8.  
  9. :HELP
  10. ECHO Usage (for XP PCs): MSUpdateFixXP
  11. ECHO This CMD script should re-enable a PC 
  12. ECHO to use Windows Update if it's failing.
  13. ECHO This typically occurs after a REPAIR is done
  14. ECHO from the original XP install CD.
  15. GOTO ENDSCRIPT
  16.  
  17. :MAIN
  18. REGSVR32 /S %WinDir%\System32\Wuapi.Dll
  19. REGSVR32 /S %WinDir%\System32\wups.Dll
  20. REGSVR32 /S %WinDir%\System32\Wuaueng.Dll
  21. REGSVR32 /S %WinDir%\System32\Wucltui.Dll
  22. REGSVR32 /S %WinDir%\System32\Msxml3.Dll
  23.  
  24. NET STOP WUAUSERV >NUL
  25. IF NOT ERRORLEVEL 1 GOTO CONTINUE1
  26. ECHO WUAUSERV (Windows Update & Automatic Service) failed to stop.
  27. GOTO ENDSCRIPT
  28.  
  29. :CONTINUE1
  30. REGSVR32 /S %WinDir%\System32\Wups2.Dll
  31.  
  32. :ENDSCRIPT
  33. NET START WUAUSERV >NUL
  34. ECHO ON
MSUpdateFix2003.Cmd :
Expand|Select|Wrap|Line Numbers
  1. Rem http://support.microsoft.com/kb/555989
  2. Rem NB Both services MUST be stopped before the rename will work.
  3.  
  4. @ECHO OFF
  5. IF .%1 == ./? GOTO HELP
  6. IF .%1 == .HELP GOTO HELP
  7. IF .%1 == .help GOTO HELP
  8. GOTO MAIN
  9.  
  10. :HELP
  11. ECHO Usage: MSUpdateFix [DRASTIC]
  12. ECHO This CMD script should re-enable a PC to use Windows Update if it's failing.
  13. ECHO Generally use the DRASTIC option only if the normal (no parameter) option fails.
  14. GOTO ENDSCRIPT
  15.  
  16. :MAIN
  17. REGSVR32 /S %WinDir%\System32\Vbscript.Dll
  18. REGSVR32 /S %WinDir%\System32\Mshtml.Dll
  19. REGSVR32 /S %WinDir%\System32\Msjava.Dll
  20. REGSVR32 /S %WinDir%\System32\Jscript.Dll
  21. REGSVR32 /S %WinDir%\System32\Msxml.Dll
  22. REGSVR32 /S %WinDir%\System32\Actxprxy.Dll
  23. REGSVR32 /S %WinDir%\System32\Shdocvw.Dll
  24.  
  25. IF .%1 == .DRASTIC GOTO DRASTIC
  26. IF .%1 == .drastic GOTO DRASTIC
  27. GOTO ENDSCRIPT
  28.  
  29. :DRASTIC
  30. NET STOP WUAUSERV
  31. IF NOT ERRORLEVEL 1 GOTO CONTINUE1
  32. ECHO WUAUSERV (Windows Update & Automatic Service) failed to stop.
  33. GOTO ENDSCRIPT
  34.  
  35. :CONTINUE1
  36. NET STOP CryptSvc
  37. IF NOT ERRORLEVEL 1 GOTO CONTINUE2
  38. ECHO CryptSvc (Cryptographic Service) failed to stop.
  39. GOTO ENDSCRIPT
  40.  
  41. :CONTINUE2
  42. DEL /F /S /Q %WinDir%\System32\Catroot2 >NUL
  43. IF NOT ERRORLEVEL 1 GOTO CONTINUE3
  44. ECHO Unable to delete %WinDir%\System32\Catroot2.
  45. GOTO ENDSCRIPT
  46.  
  47. :CONTINUE3
  48. DEL /F /S /Q %WinDir%\SoftDistBup >NUL
  49. REN %WinDir%\SoftwareDistribution SoftDistBup >NUL
  50. IF NOT ERRORLEVEL 1 GOTO CONTINUE4
  51. ECHO Unable to rename %WinDir%\SoftwareDistribution to %WinDir%\SoftDistBup.
  52. GOTO ENDSCRIPT
  53.  
  54. :CONTINUE4
  55. NET START CryptSvc
  56. IF NOT ERRORLEVEL 1 GOTO CONTINUE5
  57. ECHO CryptSvc (Cryptographic Service) failed to restart.
  58. GOTO ENDSCRIPT
  59.  
  60. :CONTINUE5
  61. NET START WUAUSERV
  62. IF NOT ERRORLEVEL 1 GOTO CONTINUE6
  63. ECHO WUAUSERV (Windows Update & Automatic Service) failed to restart.
  64. GOTO ENDSCRIPT
  65.  
  66. :CONTINUE6
  67. REGSVR32 /S Softpub.Dll 
  68. REGSVR32 /S Mssip32.Dll 
  69. REGSVR32 /S Initpki.Dll
  70. REGSVR32 /S Softpub.Dll
  71. REGSVR32 /S Wintrust.Dll
  72. REGSVR32 /S Initpki.Dll
  73. REGSVR32 /S Dssenh.Dll
  74. REGSVR32 /S Rsaenh.Dll
  75. REGSVR32 /S Gpkcsp.Dll
  76. REGSVR32 /S Sccbase.Dll
  77. REGSVR32 /S Slbcsp.Dll
  78. REGSVR32 /S Cryptdlg.Dll
  79. REGSVR32 /S Urlmon.Dll
  80. REGSVR32 /S Shdocvw.Dll 
  81. REGSVR32 /S Msjava.Dll 
  82. REGSVR32 /S Actxprxy.Dll 
  83. REGSVR32 /S Oleaut32.Dll 
  84. REGSVR32 /S Mshtml.Dll 
  85. REGSVR32 /S Msxml.Dll
  86. REGSVR32 /S Msxml2.Dll
  87. REGSVR32 /S Msxml3.Dll
  88. REGSVR32 /S Browseui.Dll
  89. REGSVR32 /S Shell32.Dll
  90. REGSVR32 /S Wuapi.Dll
  91. REGSVR32 /S Wuaueng.Dll
  92. REGSVR32 /S Wuaueng1.Dll
  93. REGSVR32 /S Wucltui.Dll
  94. REGSVR32 /S Wups.Dll
  95. REGSVR32 /S Wuweb.Dll
  96. REGSVR32 /S Jscript.Dll
  97. REGSVR32 /S Atl.Dll 
  98. REGSVR32 /S Mssip32.Dll
  99.  
  100. :ENDSCRIPT
  101. NET START CryptSvc >NUL
  102. NET START WUAUSERV >NUL
  103. ECHO ON
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.
May 20 '08 #1
0 9806

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Frogbčrt | last post by:
Config: Win2K, IIS5.0 My solution requires that the host header sent to IIS be analyzed. I have set up a web site that responds to both www.domain.com and domain.com. In DNS, both a WWW and a *...
2
by: postings | last post by:
It's now available here: http://msdn.microsoft.com/netframework/downloads/updates/default.aspx I just wondered if anybody knew when .Net FrameWork ver 2.0 will be available via Windows/Microsoft...
5
by: HydroSan | last post by:
Having a bit of a problem getting UPDATE working. The project in question is a simple MySQL VB.NET frontend, allowing Insertion, Selection, and others. Well, I've gotten Drop and Insert working,...
6
by: Joe Griffith | last post by:
I just installed the latest Microsoft security updates and find that I can no longer open compiled help files (.CHM) if they are located anywhere except my local computer. In other words I can no...
6
by: Greg P | last post by:
I am using VS2005 and have been learning a ton about databinding. I know that when you drag a view from the datasource window (creating a dataGridView) that an update method is not added to the...
0
by: Irfan | last post by:
hi, I created a clickonce application and installed it in the client machine. As expected a new shortcut is created in the Start->All Programs and i use that to run the application. When i...
2
by: =?Utf-8?B?RWxsZW4=?= | last post by:
Using XP (English). I left this huge update running to download as I am on dial up. When I got back to computer (said the download would take 68 hours) I recd an error message saying: System has...
0
by: pooch | last post by:
SPAM!! SPAM!! SPAM!! If you believe this you will believe anything -- pooch
3
by: Larry Hale | last post by:
Thank you, again, Michael, for all your help many months ago. I *FINALLY* got a HowTo done up; please see http://wiki.python.org/moin/HowTo/FileMagic I've also emailed Mr. Hupp to see if he'll...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.