Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How Do I Fix Windows Update?

Several things to try.

Working on updates
Working on updates. (Screenshot: askleo.com)
Windows Update can get confused or stuck. I'll review ways to fix Windows Update, including what I refer to as the "nuclear option".
The Best of Ask Leo!
Question: I returned from vacation and found that Windows Update would not download any of 90 available updates (even though it sat for many hours saying “downloading” nothing was coming). I eventually used the Windows Readiness program and was able to get 15 or so downloaded and installed, but trying the next group again, it is not downloading anything. There is no error message, just no action at all.

While it works well most of the time, problems with Windows Update can be very, very frustrating. There’s often no specific fix for whatever specific situation you’re faced with, other than to “keep trying” or “let it run”…

…neither of which helps in many cases.

Fortunately, Microsoft has added a troubleshooter and also outlined what I’ll call the nuclear option: resetting Windows Update completely. Regardless of the problem, if it involves Windows Update, I suggest you give this a try.

Become a Patron of Ask Leo! and go ad-free!

TL;DR:

Fixing Windows Update

If Windows Update is having problems, the best place to start is with Windows’ own built-in troubleshooter. If that doesn’t resolve the issue, there’s a Windows Powershell script to try. If that doesn’t do it, then there’s a series of command-line tools you can run manually. The latter two options re-initialize Windows Update’s view of what needs updating in cases where it has lost track.

Windows 10: Start with the troubleshooter

In Windows 10 & 11, click on the Start menu and type “troubleshoot” to search for the available troubleshooters. Click on Troubleshoot settings or Troubleshooting when it appears. In the resulting window, look for “Windows Update” in the right-hand pane. (You may need to scroll down to find it.)

Windows Update Troubleshooter

Click on Run the troubleshooter to let Windows attempt to diagnose and fix any problems it detects.

If it resolves your issue, wonderful. But with software being as complex as it is, I don’t expect the troubleshooter to work in 100% of all cases. If it didn’t resolve your issue, or your edition of Windows does not yet include the troubleshooter,1 it’s time to reset.

A few notes before we proceed

#1: Following the instructions below incorrectly — heck, perhaps even following them correctly — could damage your Windows installation. I strongly recommend you take a complete image backup prior to performing these steps and be prepared to restore that image backup should something go wrong. Something shouldn’t go wrong, but an image backup will protect you should I be wrong about something not going wrong.

#2: By following the instructions below or downloading and using the scripts provided by either Microsoft or myself, you are assuming complete responsibility for the results. For all I know, there’s something special about your machine I cannot predict or account for. While it’s certainly not the intent, the instructions and/or scripts could render your computer unbootable. Once again, your best defense is note #1.

#3: Don’t just click and run any of the scripts mentioned below. Instead, download the file by right-clicking and saving it to a location on your computer. You’ll run those scripts from within an administrative PowerShell or Command Prompt. Since these are text files, you can examine their contents at will. Note that since they are considered executable files, your security software may need to be told to “allow” the download.

#4: Line wrapping: Since text can sometimes be wrapped to accommodate your display width, if a command is listed with no space between its lines:

Command
more stuff

they’re meant to be typed on a single line with a space between the text. In the example above, you would type:

Command more stuff

followed by the Enter key. If the commands have a blank line between them:

Command 1

Command 2

they’re two distinct commands, each entered on its own and each followed by Enter.

Next: Microsoft’s script for Windows 10

Microsoft has a Knowledge Base article, Windows Update – additional resources, that includes a section titled, “How do I reset Windows Update components?”

This section begins with a PowerShell script you can download and run.2

Unfortunately, it’s not mentioned that the script appears to need administrative privileges. Simply right-clicking on the downloaded file and clicking on Run in PowerShell will briefly flash a window in which the script runs but then fails due to lack of privileges.

As a result, the steps to run the script after downloading it actually are:

  1. Open PowerShell “as administrator”. In the Start menu, scroll down to locate Windows PowerShell, click on that to expand it, then right-click on the newly exposed Windows PowerShell in the submenu, and click on Run as administrator.3
  1. Type the command:

Get-ExecutionPolicy

followed by the Enter key. Windows will print a one-word policy — most commonly “Restricted”. Note this, as you’ll need to type it in later.

  1. Enter the following:

Set-ExecutionPolicy -ExecutionPolicy Bypass

followed by Enter. Respond with Y when prompted for confirmation.

  1. Change directory to the folder containing the downloaded script. This will probably be your “Downloads” folder. Do this by typing:

CD \Users\<login name>\Downloads

followed by Enter, and where “<login name>” is replaced with your Windows login name.

  1. Type “.\” followed immediately by the name of the downloaded script, followed by Enter:

.\Reset-WindowsUpdate.ps1

  1. After the script runs, enter the following:

Set-ExecutionPolicy -ExecutionPolicy <policy>

followed by Enter, and where “<policy>” is the policy displayed returned in step 2, above.

  1. Reboot your machine.

Hopefully this will correct your issues with Windows Update.

In theory, this script includes the steps listed below. If you’re not running Windows 10, or you just want to carefully execute the steps on your own, you can do so.

Finally: fix Windows Update manually

The steps and scripts below support Windows 7 and later. If you’re running Windows XP or Vista, the Microsoft article includes a few additional steps interspersed.4

Run Command Prompt as administrator

All the following steps require administrative privileges. It’s not enough that your log-in account be administrator; you need to run the Windows Command Prompt as administrator for those privileges to be in effect.

In the Start menu, locate the Windows System heading and click on it. Then right-click on Command Prompt. Click on More if the resulting sub-menu includes that, and then on Run as administrator.5

Running Command Prompt as Admin in Windows 10
Running Command Prompt as Admin in Windows 10. Click for larger image. (Screenshot: askleo.com)

This will open an instance of Command Prompt with the administrative access required for what follows.

Stop Services

First, we’ll stop several Windows services. Type the following into the command prompt, each line followed by Enter:

net stop bits

net stop wuauserv

(Or download and run stop-services.cmd.)

Don’t worry if some of the services report an error that they’re not running.

Delete Download Manager files

Next, we’ll delete a set of files related to the Download Manager.

Del “%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat”

(Or download and run delete-qmgr-files.cmd.)

Reset software distribution and reset services

Microsoft recommends you perform this step only if running through these instructions without this step did not resolve the problem.

Ren %systemroot%\SoftwareDistribution\DataStore *.bak

Ren %systemroot%\SoftwareDistribution\Download *.bak

Ren %systemroot%\system32\catroot2 *.bak

sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

What Microsoft doesn’t mention is that the first two commands will fail if they’ve been run before, meaning that if the backup folder “%systemroot%\SoftwareDistribution.bak” already exists, or the backup folder “%systemroot%\system32\catroot2.bak” exists, the rename will fail. If that happens, do not proceed until you have removed the pre-existing “.bak” folders manually. Since “%systemroot%” is typically “C:\Windows”, look for “C:\Windows\SoftwareDistribution.bak” and “C:\Windows\system32\catroot2.bak”, and either rename them to something else, or delete them. (You did take that image backup, right? :-)).

Here’s a batch file that includes those commands, but also pauses after the rename to give you an opportunity to abort: reset-software-distribution.cmd.

Re-register DLLs

Enter the following commands exactly:

cd /d %windir%\system32

regsvr32.exe atl.dll

regsvr32.exe urlmon.dll

regsvr32.exe mshtml.dll

regsvr32.exe shdocvw.dll

regsvr32.exe browseui.dll

regsvr32.exe jscript.dll

regsvr32.exe vbscript.dll

regsvr32.exe scrrun.dll

regsvr32.exe msxml.dll

regsvr32.exe msxml3.dll

regsvr32.exe msxml6.dll

regsvr32.exe actxprxy.dll

regsvr32.exe softpub.dll

regsvr32.exe wintrust.dll

regsvr32.exe dssenh.dll

regsvr32.exe rsaenh.dll

regsvr32.exe gpkcsp.dll

regsvr32.exe sccbase.dll

regsvr32.exe slbcsp.dll

regsvr32.exe cryptdlg.dll

regsvr32.exe oleaut32.dll

regsvr32.exe ole32.dll

regsvr32.exe shell32.dll

regsvr32.exe initpki.dll

regsvr32.exe wuapi.dll

regsvr32.exe wuaueng.dll

regsvr32.exe wuaueng1.dll

regsvr32.exe wucltui.dll

regsvr32.exe wups.dll

regsvr32.exe wups2.dll

regsvr32.exe wuweb.dll

regsvr32.exe qmgr.dll

regsvr32.exe qmgrprxy.dll

regsvr32.exe wucltux.dll

regsvr32.exe muweb.dll

regsvr32.exe wuwebv.dll

— or download and run register-dlls.cmd.

You will have to click an OK button for each one. In addition, several will fail. As unnerving as that may seem, it’s OK. Not every system is configured the same way, and thus not every DLL will be present.

Reset the network

Reset network components with the following commands:

netsh winsock reset

(Or download and run reset-network.cmd.)

Restart services

Now we restart the services we stopped earlier.

net start bits

net start wuauserv

(Or download and run start-services.cmd.)

Finally, Reboot

Naturally, much of what we’ve done will require a reboot to take final effect.

What did we just do?

After all that mumbo-jumbo, you’re probably wondering what you just did, be it manually or via a script.

The best analogy I can come up with is clearing your browser cache. Just as your web browser tries to avoid multiple downloads and generally speed up your browsing by keeping many things in a cache on your machine’s hard disk, Windows Update does something similar. Rather than re-analyzing, slowing down your system, and perhaps even downloading information repeatedly, it caches much of what it learns about your system on disk.

And just like the browser, sometimes the cache can get “confused”.

We’ve simply cleared out the cache and reset a few things to known states so Windows Update can start with a clean slate.

(To be clear, browser caches and the Windows update cache are completely unrelated to one another; just the concepts are similar.)

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

Footnotes & References

1: Naturally, I recommend you update to a version that does, but of course that requires Windows Update to work.

2: It’s unclear if this does exactly what the troubleshooter did, or something more. Since we don’t know for sure, it’s worth a try.

3: In Windows 10 and 11, if your system is so configured, you may instead be able to right-click on the Start menu and then click on Windows PowerShell (Admin).

4: In Windows 10 and 11, if your system is so configured, you may instead be able to right-click on the Start menu and then click on Command Prompt (Admin).

5: Though, to be fair, Windows Update isn’t of much use on these no-longer-supported operating systems.

Podcast audio

Play

58 comments on “How Do I Fix Windows Update?”

  1. Twice, I’ve had update problems on someone’s machines. The first time, on a Win7 machine, Windows Fix-It fixed the problem.
    The second time, on another Win7 machine, it didn’t work, so I did more research, with my favorite research tool, Google.

    I found the following info, and it worked:

    Click on Computer, System drive (usually C), Windows, SoftwareDistribution, Download.
    Delete contents of Download folder. Restart computer.
    Run windows update.

    Of course, anything can go wrong at any time, so make a full backup first. Leo may have mentioned that already. ;)

    Reply
    • i had the same problem. I had to update a windows 7 laptop from a friend which was not used for a long time.
      Renamed the softwaredistribution folder (in windows, not command line) and updates started coming in!

      Reply
  2. Thanks Leo. Any info that comes from you I gladly rely on and trust completely, you are a valuable resource to be sure. Enjoy also your writing style, which is, how to describe it, pleasant.

    Reply
  3. I have a very simple solution which may cure Windows Update problems. I am running Windows 10 pro and I always get a message that Windows Updates failed to install. I then turn on the Windows Firewall and the updates download and install. I don’t know why this is as I already have Vipre Internet Security running but it works every time.
    Hope this helps someone.

    Reply
    • Bizarre! Does disabling the firewall in VIS enable updates to install. I could be way off with this, but the only possible explanation I can come up with is that VIS is actually the apps that’s blocking the updates, but Windows Firewall somehow overrides its settings when turned on.

      Reply
  4. After months of on and off again gettting a few updates only installed on my Friends win 8.1 notebook something came along that looked like a “service pack”. This fortuantely downloaded and installed and after that Windows AU worked fine. Miracles,

    Reply
  5. When I run Windows Firewall to enable me to download Windows updates, I still leave Vipre running.
    I tries shutting down Vipre without enabling Windows Firewall but Windows Update would not work without enabling Windows Firewall. Don’t know why this is but it is the only way I can download and install Windows Updates. This only refers to Windows Updates! Strange but it works on my Laptop.

    Reply
    • I still suspect that VIS is causing the issue. Security programs can be resistant to being shutdown. It’s basically a defence mechanism against them being automatically closed by malware. Next time it happens, instead of shutting VIS down completely, try disabling its firewall component and see what happens.

      Reply
    • Robin,
      I just talked with Vipre and he told me that we might need to re-set the firewall, in order to not have any more issues. I thank you for bringing this to light though. I have the Home version of win10, and it wants to DL updates for defender, which I don’t use.
      I shall try your suggestion though. Thank You, Dave

      I really wish they would tell me when updates were coming, although I can figure it out, when other programs are acting funny.

      Reply
    • @Robin Given Dave’s comment – and the fact that the issue does indeed seem to be related to VIS – I’d replace VIS with something else. Getting updates in a reliable manner is extremely important. Other solutions would provide you with similar protection – likely better protection, in fact – without interfering with Windows Update.

      Reply
  6. I’m definitely bookmarking this article.

    Few things have been more frustrating to me than when Windows Update malfunctions. Just a couple of examples: During the final half-year of Win XP support, I couldn’t get Windows Update to work for 3 straight months. It turned out to be a problem on Microsoft’s end. I recently restored my Win 7 PC to a two-year old disk image. Everything worked fine – except Windows Update. Ultimately, I had to go all the way back to my bare-metal disk image to get Windows Update to work right – except I couldn’t get Microsoft Update to work, and I still can’t. (I did update Internet Explorer from version 10 to version 11, which went smoothly. I’m assuming this wouldn’t cause my problem. Now, when I click on the “Get updates for other Microsoft products” link at the bottom of the Windows Update page, it takes me to a Microsoft.com page that only has an image that shows how to get to Windows Update from the Start button.)

    Leo, does the procedure in the article also apply to fixing Microsoft Update? If not, I hope you’ll write an article on fixing Microsoft Update, too.

    Thanks…

    Reply
    • You might want to wander over to askwoody.com. Many people having the same problem. Some mentioned the same thing with XP at its end. If I was Paranoid,I might suspect that Microsoft is putting most of its servers towards W10 and letting the rest of us suffer,unless we upgrade. Luckily,not being paranoid,I would never think such a thing. I am having the same thing happen on both desktop w7-64 and laptop w7-32.

      Reply
  7. Very nice but I think I wont dare all that complex task
    Fortunately you give log to make automatic every step
    The main problem , in my opinion, is to decide wether the trouble is relates to windows update or not
    Update failing are going more and more frequent, but not for all updates.
    How to know wich update is absolutely mandatory and be worth doing all that complex task??

    Reply
    • I keep my Windows Update checked on the CHECK FOR UPDATES BUT LET ME CHOOSE WHETHER TO DOWNLOAD AND INSTALL THEM, and then when updates do come up for installation and downloading, I google each by entering “definition of KB(update number). If it applies to my Win7 OS or is mandatory, I install it. On any updates that that have something to do with Win10 or does not apply to my OS, I right click on them, and then click on “Hide this update”.

      Regarding having problems with Windows Update, I have had the problem of clicking on “Install and Download Updates” but nothing happened…twice. It just had the appearance of of installing/downloading…..FOR A LONG TIME. I thought it was just a glitch in the system, and because I wasn’t aware that this problem had a solution like the one Leo has shown above, I just powered off my machine after trying everything I could think of doing first, of course. Powering down was my LAST resort. I didn’t even think to make a system image before doing this…but it worked.
      (Leo: I know you’re wincing as you read this. Sorry. At least in the future, I’ll at least make a backup image.)

      Reply
      • The things is that most of us do not have the knowledge to know which updates to take and which to ignore. The more you mess around with it the more likely future updates will have problems. If you feel that you need to be in complete control of your machine then it would be good to explore moving to Linux.

        Reply
      • Microsoft is forcing updates because the vast majority of Windows users wouldn’t be able to make an educated decision on which updates to install. They did this to protect them against malware exploits. These updates might cause some problems, but in the long run, those updates prevent many more problems than they might cause. It’s comparable to vaccinations. In some cases, they may cause illness, but in the long run, they prevent many more serious epidemics.

        Reply
  8. Windows update was stuck for hours on checking for updates while doing an upgrade to Windows 10 from 7. The “Automatically diagnose and fix common problems with Windows Update troubleshooter” helped to unstick it with quick results.

    Reply
  9. Leo, do you have confidence that these actions will repair the inability of Windows 10 to download / install the cumulative update for Windows 10 Version 1511 for x64-based systems (KB3140768)? There seems to be hundreds / thousands (or more?) of users with this issue (from what I can tell by visiting the Microsoft Community).

    Reply
  10. Can you tell me why MSN freezes. It stops and indicated that explorer is not responding. If I wait it will restart. It’s a pain when I’m right in the middle of a project. Is there a cure for it. Is there an update coming?
    Thanks.

    Reply
  11. My problem with Windows update? Turn update on (from Services) and it promptly runs CPU use up to 100% and stays there. Regardless… Tried the Windows Fixit, with absolutely no change, so as soon as I can spare a couple of hours will try your manual fix (Win 7 Pro, HP Pavilion machine). Thanks for a very informative and useful article — hope this works. BW

    Reply
    • The steps outlined above will probably not help in this situation. Google it and you’ll find a number of solutions, one of which will likely be relevant to your configuration. For example:

      Installing and searching for updates is slow and high CPU usage occurs in Windows 7
      https://support.microsoft.com/en-us/kb/3102810

      High memory usage by the Svchost.exe process after you install Windows Management Framework 3.0 on a Windows-based computer
      https://support.microsoft.com/en-us/kb/2889748

      Reply
    • This reply is after almost two years (I came across the article after Leo’s updates-related posting 693, 27th Feb 2018), but it may help someone with the same issue which I also had, viz the manual or automatic update hanging with high svchost.exe CPU of 99%, making the computer unusable unless updates were turned off completely.
      I did try re-setting the update components as described here, and appreciate Leo’s help with the batch files, but unfortunately to no avail. Incidentally, the original instructions from Microsoft were in KB971058 which has now been withdrawn, but I was able to find them through Internet Archive, as I had to modify them for use on an old XP computer, configured to receive the WEPOS updates.
      In the end what worked was a posting I discovered on an MS Social Technet website, “Windows Update Hangs – 100% CPU svchost”. The simple solution was to uninstall Internet Explorer 8. I did this and re-booted, and after months of problems the updates started flooding in and CPU use went back to normal. Much to my surprise, I didn’t even have to re-install IE8, as manual updates appear to have been re-enabled via IE6.

      Reply
  12. I am running Win 7 64 on i52500K with 8 gig ram used mainly for hd video and music in a rural location with 5 gigs metered mobile. It will only update Windows when set to auto. Last month it installed a 250mb compatability pack for Office 7 – no use for 2003. I can’t afford to put it on line anymore let alone even consider Win 10 from what I gather. MS is taking away the use of what I purchased in good faith. I guess at 81 it’s farewell to having a PC on line. Any suggestions?

    Reply
    • I’ve installed Linux Mint on some friends’ computers, and they were all happy with it. It might be an option for you.

      Reply
      • I am running Win 7 64 on i52500K with 8 gig ram used mainly for hd video and music in a rural location with 5 gigs metered mobile. It will only update Windows when set to auto. Last month it installed a 250mb compatability pack for Office 7 – no use for 2003. I can’t afford to put it on line anymore let alone even consider Win 10 from what I gather. MS is taking away the use of what I purchased in good faith. I guess at 81 it’s farewell to having a PC on line. Any suggestions?

        Reply
      • Well I have been through XP, Vista, 7 and now using Android so I’m not too old too learn another. Never use a computer until 03. Would Mint run my Adobe Photoshop and Premiere Elements 10 and Office 03 mainly Word I like. Also like Outlook but have a hunch it is more data efficient to send files by Gmail directly. Am I correct?

        Reply
        • If you use programs like Photoshop, it would probably be better to stick with Windows. Windows 10 professional allows you do defer automatic updates.

          Reply
          • Had a thought after my reply. My hd is 1 tb. Could I creat a partition for Mint for the few on line things I do (much now is on my tablet) and keep Win 7 unpatched and off line? I’m still using my first computer purchased end of 03 with XP for recording fm music and totally off line.

          • It can be set to dual boot. Mint even gives you that option on installation, so you don’t have to think much about how to do it. An unpatched Win 7 would be relatively safe if you never get online with it. Maybe you can do manual upgrades at the end of the month when you have a couple of GB available on your plan. Maybe Leo has better suggestions as he has worked on a metered connection with a data cap.

        • “Also like Outlook but have a hunch it is more data efficient to send files by Gmail directly.” – No, the bandwidth usage would be pretty much exactly the same whether you use webmail or Outlook.

          Reply
  13. My laptop with 4 GB RAM & 2.1 MHz CPU running Win 7 provides good performance most of the time IF “Win Update” service is stopped. Otherwise the svchost process takes almost 50% of CPU cycles. This config works well until Win Update runs when an apparent freeze results – any update activity appears to “hang” even after running the “nuclear option” described in recent AskLeo blog is run successfully. Is there any hope for this situation especially considering that MS no longer is interested in improving Win 7 ?

    Also my desktop which has 8 GB RAM and runs Win 7 appears to “choke” while applying certain fixes (KB3080149 & KB3097966 among others) individually. During the required restart a msg appears which says “do not turn off”. However the only recovery for me is to power down and take the subsequent option to start Win normally. Can anyone help this poor but honest user apply updates to Win 7 ??

    Thanx.

    Bewildered Bob

    Reply
    • UPDATE TO WIN 7 UPDATE FAILURE POST – i cannot apply even one optional update ( MSE definitions @ 225K). What shd only take a few minutes runs for hours but fails to apply the update. What is wrong ?

      Bewildered Bob

      Reply
      • UPDATE # 2 TO PREVIOUS POSTS ABT WIN 7 UPDATE FIASCO –

        (1) Control Panel -> Trouble Shooting -> System & Security -> Fix Problems w Win Update * DOESN’T *
        (2) System File Checker (SFC) completes normally – no problems found.

        Bewildered Bob

        Reply
  14. A warning. Had terrible trouble with windows 7 installing updates. Microsoft fixit did not work. However when I changed settings from notify but let me download and install to automatic install – Windows update worked. Had to delete GWX control panel. Another way Microsoft is pushing windows 10 by stealth

    Reply
  15. Running Windows 7-64 on Dell Inspiron notebook. I have the same problem with Windows Update appearing to freeze. I reinstalled my computer from an image backup from before the last successful windows update, but the problem still happens. So I am sure the problem is not on my end.. Doing some searching, someone suggested turning off Windows Firewall. I did this and, after a long time the updates finally happened.

    Microsoft screwed up with Windows 8. Now Windows 10 is screwing up everything! Way to go Microsoft. Maybe Bill Gates needs to come out of retirement and get Microsoft straightened out.

    Reply
  16. This did not work for W-10 on my “Acer Aspire ES 14” ,, only because the last step download does not install to W-10 !! Any other fixes available ?? Or should I just go for the reset feature ,, My notebook is not accepting updates for 1/2 a month now …

    Reply
  17. Searching for the solution to something else today I ran across this post, noting that it’s something I found elsewhere last week while trying to fix a Windows Update issue (turns out for us the anti-virus we use didn’t properly disable Defender on the affected machines, causing them to fail to report to our WSUS server and possibly to be updating at all). All the same commands in the same order. I ended up making a couple slight changes after bundling it all into a single batch file.

    You mention the possibility of the line “Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak” failing if the folder already existed. I got around this by adding “If exist “%systemroot%\SoftwareDistribution.bak” rd /s /q “%systemroot%\SoftwareDistribution.bak”” in the line before it, and doing the same for catroot2 (making the appropriate path changes, of course).

    I also added the /s switch to all of the regsvr32.exe calls to suppress the dialogs since whether or not they fail is immaterial.

    One other thing I noted which I couldn’t get around with the batch file was that in most cases trying “net stop wuauserv” would fail. I’d have to force it to quit in services.msc or even make the service manual then stop it. Not once would it respond properly to the net stop command.

    Hopefully you and others find this helpful.

    Reply
  18. I just managed to get my Vista 32 sp2 machine to download and install updates in a few minutes–after several months of extended problems, so thought I’d share this in case it could help others…

    That machine has always been set to notify me of available updates and let me choose to download and install; it has always worked well until a few months ago when the only way I could get it to work was let it run for 24 hrs. (Since I only turn on this machine a couple times a month, I’ve been manually checking for updates after each patch Tuesday). Then that no longer worked after 2 months. After the latest patch Tuesday I found the Microsoft page that lists all the individual update files for the various versions of Windows and manually downloaded the ones for my system. I was actually coming here to ask if that might have been a mistake to do that for some reason (and I’d still like to know the answer to this question), when I turned on that machine and found Win Update telling me that I had 8 available updates. (This was the first time I’d seen such a notification in several months, and have no idea if these were part of the previous patch Tuesday updates that weren’t listed when I downloaded, or if more were added later)

    Soooo…I clicked to let update download them BUT it sat there hung up in download mode as before. Then suddenly I got an idea–I changed the download method to ‘automatic’, restarted the computer and tried again. The updates were then downloaded and installed within a few minutes!

    My conclusion (as I had suspected)–Microsoft has ‘updated’ my old Vista machine to act like Win 10, i.e. to no longer give an option to control your own downloads in Vista, but to let Microsoft be in control. (I saw this happen on my newer Win 7 machine when my preferred download option never worked the way I had it set, until, interestingly, I downloaded GWX control panel and set my preferred option through that program (at least I don’t think it was a coincidence that it started working after I installed this program, and now I’m afraid to uninstall it lest I suffer the old problems again).

    Hope this is helpful to others. As I said, I would also like to know for future reference if there is a reason that just downloading from the Microsoft site directly might mess up my machine somehow?

    Reply
  19. For readers who, like me, have been experiencing the very frustrating problem with super slow Windows Updates on a Windows 7 PC, here’s a possible permanent solution.

    I’ve been having problems with Windows Update for many months. Most of the time, there was no problem scanning/detecting the updates. However, downloading and installing the updates took half a day usually and often several days of repeated attempts. Recently, I started having problems with detecting the updates also.

    The solution that worked for me (so far) involves installing KB3172605. For detail on what to do, go to InfoWorld.com and search for a Nov. 4, 2016 article by Woody Leonhard (“How to speed up Windows 7 Update scans – forever”). After I installed this speed-up patch, my PC scanned, downloaded, and installed the monthly Windows updates in less than 15 minutes. This solution has worked on both of my Windows 7 PC’s. What a relief!

    As a double benefit, KB3172605 seemed to also have fixed the high CPU usage problem associated with svchost.exe. In my case, the svchost.exe issue appears to be related to the Windows Update process. I’m guessing that when I fixed the Windows Update problem, the svchost.exe problem also went away. (If this doesn’t fix your svchost.exe CPU drain problem, try disabling the Windows Update service. Then change the service back to the Automatic (Delayed Start) setting before you perform the monthly update.)

    It takes a village to maintain my PC’s. Thank God for people like Leo, Woody, and many others who freely share their expert knowledge.

    Reply
  20. I have gone through this once and it didn’t work yet. My question is when I try to delete the qmgr files it says the path is not recognized. I typed out and I used your link. I really think this would work if I could get past that step. My computer was running slow so I reinstalled windows and right away started having problems with Windows update. I have run the troubleshooter several times. Is there another way for me to find that? I did a search for it on my computer and it is not finding it.

    Reply
    • I wanted to add to my previous post. When I type in the line to delete the qmgr*.dat files I get this error “the system cannot find the path specified”. What can I do to make this work?

      Reply
    • Another problem I am having is in the section of re-registering dlls. I get an error of “____ was loaded but their entry point dll register server was not found. Make sure______ is a valid dll or ocx file then try again.” I got that error on several of the dlls and I am not sure what to do. Can you please help?

      Reply
  21. Leo – I was just over at the Microsoft site, and their commands are exactly as what you have posted. However, I believe downloading and using your batch files will greatly reduce the chance of typing errors and speed things up immensely. I am going to give it a try.
    From there site – – –

    Article ID: 971058 – Last Review: Feb 27, 2017 – Revision: 5

    Applies to
    Microsoft Windows Update, Microsoft Update, Windows 10, Windows 8.1, Windows 7

    Tom

    Reply
  22. In my above post on March 17, 2016, I mentioned how I was having problems with (1) the monthly Windows update (super slow) and (2) the Microsoft other products update (can’t update) on my Windows 7 PC’s. Then in my above November 12, 2016 post, I described a solution I found that fixed the very slow Windows update issue. Now I want to share a solution I found to the problem I had with the Microsoft other products update.

    It appears my problem with the Microsoft update is related to the transition I made from Internet Explorer 10 to Internet Explorer 11. After this change was made, the Microsoft Update setting in Windows Update (which allowed me to get updates for Microsoft products) disappeared. When I then went to http://www.Update.Microsoft.com to try to download the software to re-install the Microsoft Update setting, that page showed only an image of how to use your Start menu to check for updates. It turns out that page wasn’t displaying correctly. Here’s the solution I found on the internet (credit to a poster named “DMY2000”):

    • Open IE 11 in the Administrator user account
    • Select Tools / Compatibility View Settings
    • Add Microsoft.com to the Compatibility View list, and then Close
    • Select Tools / Internet Options / Security / Trusted Sites / Sites
    • Add *.Microsoft.com to the website list, and then Close and OK
    • Go to http://www.Update.Microsoft.com, and now the page should display correctly. And as a result, you’ll now have the opportunity to download and install the software that will re-establish the Microsoft Update setting in Windows Update.

    Running Windows update again generated for me 8 additional important Microsoft products updates, a few which were released a couple of years ago. I find it hard to believe that a Microsoft website was not being displayed correctly by Microsoft. However, though it was hard to find, I’m glad there is an easy fix.

    I hope this helps someone.

    Reply
  23. With respect to the current WannaCry hack, people who can’t install Windows Updates are in trouble. That includes me. I have Windows 8.1 and have not been able to install updates for the last 7 months—it either hangs for hours during the search or generates an error message like 8024A000. My problem: I’m not a computer expert. I’m an ordinary person with a low level of computer knowledge, like millions of others. I have spent at least 50 hours researching this Windows Update hanging problem. I have implemented about 20 solutions suggested at websites like this to the best of my ability, with no success. I simply don’t have the ability to reinstall Window Update as suggested here. To attempt this would be suicidal. Of course I’m unable to install security patch KB4012598.

    One problem is that after each solution attempted, you would have to let Windows Update run overnight to find out whether it worked. That could take days upon days.

    There must be thousands of people like me who can’t install the WannaCry security patch because of a Windows Update problem AND who don’t have the technical ability to fix that problem. A double whammy from Microsoft! I’m tearing my hair out.

    Reply
    • If Windows update is THAT broken – that the fix outlined in this article cannot or will not work, then you have exactly one solution: back up your system, and reinstall Windows from scratch, taking ALL updates until it’s completely up to date.

      Reply
  24. I was recently having problems with update. My settings on Windows 10 Home were for automatic but one failed and I had to update Windows defender manually. I realized that I had recently changed settings for the Internet to a metered setting. When I turned it off everything worked fine. Whether it was the metered setting or that I had changed something is ???.

    Reply
    • The metered setting blocks automatic updates. The’s the main reason it exists, to prevent upgrades from using up your bandwidth allocation. Many people use that setting to block updates.

      Reply
  25. Thanks for documenting this manual process. MS retired the article it is based on, KB971058. They literally did it over night. I was looking at the KB yesterday. Today it redirects to the automated page.

    Reply
  26. Hi Leo,
    My beef is not the ‘broken’ update but the time taken. The last ‘update’ started when I switched my PC on at 09:00 and was still a blue screen with a spinning circle at 17:00. It finally finished about 19:00.
    So a whole day completely wasted and at the end of the day, apart from a shade change on the desktop I can find no apparent difference.

    Reply
    • Most update changes are security updates and bug fixes.The shade changes are probably to let you know that changes have been made.

      Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.