What does Windows 10 do while it is "preparing to install updates"?
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.
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).
I've captured the Windows Update activity with the Microsoft-Windows-WindowsUpdateClient
ETW provider.
Here I see no event prepare:
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:
and I see disk IO where TRustedInstaller.exe copies data to C:\Windows\WinSxS\Temp\InFlight\
and C:\Windows\SoftwareDistribution\Download\
.
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":
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.