What does Windows 10 do while it is "preparing to install updates"?

19

2

I notice that Windows 10 seems to spend a lot of time "preparing to install updates" before it actually gets on with it. I also note that for most of that time, the progress bar doesn't advance at all. Like how it just now stayed at 10% for a long time (I didn't clock it, but I don't think I'm exaggerating if I put it at a few minutes), then jumped to 68%, relating to a single update.

Because the text alone is apparently not clear enough, here is a screenshot of the specific Windows Update step that I am asking about (follow the link to see the full screenshot from which the below has been cropped). Note that the screenshot was taken during a different update session than the one I am talking about in the first paragraph, hence the percentage complete is different.

Windows Update is 33% done with "Preparing to install updates"

What does Windows actually do with all this time? What "preparations" are taking it such extreme amounts of time?

Note that I am not asking about the actual installation of the update.

While the particular time that prompted me to ask this question was in a VM, I'm seeing similar behavior with Windows 10 running on actual hardware, so I don't think it's related only to the fact that it's running in a VM (even though that could perhaps be a factor).

a CVn

Posted 2017-05-21T13:58:55.057

Reputation: 26 553

I checked it this month again and this is GUI bug, at this stage WindowsUpdate actually is installing the update, there is NO preparation at all, this is the actual install.

– magicandre1981 – 2017-06-17T06:16:46.170

Answers

11

I've captured the Windows Update activity with the Microsoft-Windows-WindowsUpdateClient ETW provider.

Here I see no event prepare:

enter image description here

I only see Start and Stop of Download and Install.

I now used WPRUI to trace DiskIO and CPU usage during the step "preparing to Install Updates".

Here I can see that the TrustedInstaller is busy checking hashes (wcp.dll!CCSDirectTransaction::VerifyFileHashes) of the update data:

enter image description here

and I see disk IO where TRustedInstaller.exe copies data to C:\Windows\WinSxS\Temp\InFlight\ and C:\Windows\SoftwareDistribution\Download\.

enter image description here

So basically this "preparing to install" is actually the installation of the update, so this an confusing output.

With 1809, Microsoft fixed the wrong status and shows directly the correct "installing text":

enter image description here

magicandre1981

Posted 2017-05-21T13:58:55.057

Reputation: 86 560

1what's that GUI tool you used to capture ETW events? – phuclv – 2019-05-01T09:49:58.587

1it is called perfview – magicandre1981 – 2019-05-01T13:04:09.840

2

It's my understanding Windows is creating a shadow copy during this step, though I'm not able to find any sources to confirm this. However, I will offer the observations that:

  • A shadow copy must get created at some point during the update process in order for System Restore to work.
  • Shadow copy creation always takes a noticeable amount of time time, even with an ideal system configuration. Further, depending on the number of VSS-aware applications installed, this can take "longer" than on other similar hardware configuration as the multiple VSS writers quiesce the data they're responsible for.
  • The computer's storage subsystem performance can further exacerbate the time to complete a shadow copy, as this is a disk intensive process.

I doubt this is the only action being performed during the "Preparing Updates" phase, but it would account for a significant portion of the time required.

I say Reinstate Monica

Posted 2017-05-21T13:58:55.057

Reputation: 21 477

no, I checked it this week again. At this stage Windows Update actually INSTALLS the updates, the message is simply wrong – magicandre1981 – 2017-06-17T06:15:10.427

-5

I think that the most likely answer would be that Windows is unpacking some archives (or even downloading them) and it is definitely preparing the system for the next bootup, so instead of starting normally it continues with the updates.

FluxCap

Posted 2017-05-21T13:58:55.057

Reputation: 1

1"Downloading updates" is a step separate from "preparing to install updates". Preparing the system for the next boot (to update files that are locked) would seem to me to be a part of the installation process, not preparing for install. And even if it was; reasonably, doing so would involve placing the updated files in some temporary location and write some information (knowing Microsoft, probably to the registry) to tell Windows to resume updating during the next boot. Barring an updates well into the gigabytes range, that shouldn't reasonably take more than a few seconds. – a CVn – 2017-05-22T06:14:49.793