Skip to content

Instantly share code, notes, and snippets.

@bklockwood
Last active April 25, 2016 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bklockwood/444197e40a75a537e86986460c8656f9 to your computer and use it in GitHub Desktop.
Save bklockwood/444197e40a75a537e86986460c8656f9 to your computer and use it in GitHub Desktop.

Brief overview of how Windows Update (WU) works, as I understand it:

  1. WU downloads a file called wsusscn2.cab from the MS content delivery network point nearest you. Depending on various network factors, this is usually completed within 10-60 seconds. (I have written a short script to manually verify this)
  2. The cab file is cryptographically signed. This signature is checked, and the cab is extracted. The cab contains more cabfiles, also crypto-signed. Their signatures are checked and they are extracted.
  3. These files are parsed against the live windows system to see which of the available updates actually need to be applied to this PC. WU tries to get is many patches into one 'install-and-reboot' operation as it can, but sometimes successive reboots will be needed.
  4. After the processing is complete, a list of eligible updates is displayed, and the user is asked to choose which ones to install.
  5. After user makes his/her choices and click the 'install' link, WU begins downloading them one-by-one.
  6. After all downloads are complete, WU installs the updates, again one at a time.

So let's install Windows 7 Pro, from clean SP1 media, into a VM on Hyper-V (so thus having no non-MS drivers or other software to update). Now, lets run WU for the first time. It will grind and grind for 30-90 minutes (in my test lab), and return a list of over 190 patches that it would like to install. Not including optional languages!

Steps 2 and 3 of the above process are where the bug is. It has nothing to do with your network speed or the availability of Micrtosoft's WU servers; step 1 almost always completes speedily. But steps 2 and 3, in my testing, always take 30-90 minutes, and I have had reports of them taking as much as 7 full days! That's the high outlier; most people report that it takes from 1-6 hours. I assume that most of vairiation is due to varying hardware and driver combinations.

There have been 8 different patches to WU in the Win7 cycle that I know of:

  • KB3050265
  • KB3065987
  • KB3075851
  • KB3083324
  • KB3083710
  • KB3102810
  • KB3112343
  • KB3135445
  • KB3138612 (supercedes all of the above)

To the best of my knowledge, only the last of these, KB3138612, fully fixes the issue. But, if you install it alone, it uses the wusa.exe installer. Which will still perform steps 1-3. Which will leave you staring at this for 30-90 minutes! After which, WU will find the other ~190 updates in under 5 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment