473,624 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft Update Not Working

NeoPa
32,566 Recognized Expert Moderator MVP
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.C md :
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 9836

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

Similar topics

1
2999
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 * A record exist, so either www.domain.com or domain.com gets directed to the same web site. However, I wish for whatever.domain.com to point to the same web site and for my ASP page to analyze the URL to determine what (if any) was entered BEFORE...
2
1574
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 Update? Cheers
5
4164
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, but to edit a table row, I'd like to use Update. I have the following code in a class: Private Function SQL_CustomerUpdate()
6
1393
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 longer open help files stored on our server. Is there a way around this problem? *** Sent via Developersdex http://www.developersdex.com ***
6
5202
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 table adaptor. I would like to update the b ase tables thorugh the view. How do i do this? FYI: I have some reserarch on how to handle updating multiple tables and making sure I don't break referential integrity, yet in this case I will not be...
0
1090
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 re-publish the application again after making changes, according to the documentation the program should automatically detect a newer version and run that. However this does not happen in my case, instead
2
1863
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 recovered from a serious error. I didn't get the error number sorry. My microsoft update history showing 2007 Microsoft Office Suite Service Pack 1 (SP1) failed to install. From what I can gather I have to redownload with the microsoft office...
0
1151
by: pooch | last post by:
SPAM!! SPAM!! SPAM!! If you believe this you will believe anything -- pooch
3
4184
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 re-post the SWIG version; he's working on a newer binding (forget... ctypes??) and once that one's working... :) But for now...
0
8173
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8621
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.