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

47,958

Solution 1

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

Solution 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.

Share:
47,958

Related videos on Youtube

user
Author by

user

Updated on September 18, 2022

Comments

  • user
    user almost 2 years

    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).

  • user
    user about 7 years
    "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.
  • magicandre1981
    magicandre1981 about 7 years
    no, I checked it this week again. At this stage Windows Update actually INSTALLS the updates, the message is simply wrong
  • phuclv
    phuclv about 5 years
    what's that GUI tool you used to capture ETW events?
  • magicandre1981
    magicandre1981 about 5 years
    it is called perfview