IUpdate::get_MaxDownloadSize returning 100s of GBs

Tea 1 Reputation point
2022-09-19T14:02:12.513+00:00

When utilizing https://learn.microsoft.com/en-us/windows/win32/api/wuapi/nf-wuapi-iupdate-get_maxdownloadsize, some updates are retuning 100s of GBs despite the Microsoft Update Catalog not showing such sizes.

For example:
ID: "8da25b5f-b5e1-455e-9ae9-7697212593d7"
PATCH: "2022-08 Cumulative Update for Windows 11 for x64-based Systems (KB5016629)"
MAX: "130944369686"

https://www.catalog.update.microsoft.com/Search.aspx?q=KB5016629 shows:
Size of no greater than 405.2 MB.

Why does the API return such a large value?
Is this expected behavior?

No errors are being returned when this API is called.

Windows development | Windows API - Win32
0 comments No comments

3 answers

Sort by: Most helpful
  1. abbodi86 5,101 Reputation points
    2023-03-15T10:06:26.1033333+00:00

    Unified Update Platform

    starting with Windows 10 v1709, each Cumulative Update bundle include the full set of UUP files which represent complete OS installation files, for all languages, all Features on Demand, plus the regular updates files (in all fomats together, express/full/baseless)

    the returned size is pretty much correct

    of course, actual Windows Update installation would only download the required "updates" files (which used express update mechanism up to Win10 v1803, before switching to PSFX format with Win10 v1809)

    Was this answer helpful?

    0 comments No comments

  2. Jeanine Zhang-MSFT 11,356 Reputation points Microsoft External Staff
    2022-09-23T06:32:22.367+00:00

    @Tea

    The MaxDownloadSize property is not always downloaded. The MaxDownloadSize property is downloaded based on the configuration of the computer that receives the update. As far as I'm concerned, it is normal phenomenon.

    I suggest you could refer to the thread: https://social.technet.microsoft.com/Forums/windows/en-US/1330f75f-7899-457e-a772-8cfc673a7cf1/windows-update-agent-returns-wrong-size-of-updates

    Was this answer helpful?


  3. Michael Taylor 61,236 Reputation points
    2022-09-19T15:00:55.067+00:00

    This is because of how Windows updates work (and have for a while now). A full discussion is beyond this post but you can get the highlights from here.

    The gist of it is that in a perfect world you are running current OS versions with updates. Therefore the get_MinDownloadSize returns the minimum size needed to apply the update. However the update has to account for all the variants including you missing updates. Therefore it may have to download more than the minimal. In the worst case it'll down get_MaxDownloadSize of data which is the entire update. But this shouldn't be common.

    If you're trying to figure out how much space to reserve for the update then consider using get_RecommendedHardDiskSpace instead.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.