Script to find latest cumulative updates

Page 1 of 2 12 LastLast

  1. kvm
    Posts : 9
    Window 10 LTSC
       #1

    Script to find latest cumulative updates


    Do you know of any script around which can find the latest cumulative update for a given Windows build, say 1809, parhaps parsing catalog.update.microsoft.com?

    The idea is to slipstream the update in a cusom Windows install ISO.
      My Computer


  2. Posts : 4,174
    Windows 11 Pro, 24H2
       #2

    I'm not aware of a script to download the latest updates (maybe someone else is aware of such). I tend to download the updates manually for a few reasons:

    1) Microsoft seems to have been tweaking the descriptions of some of the updates lately which makes scripting a little difficult.

    2) It's so simple to pull the updates down manually that it hasn't been worth the effort to me to try scripting this.

    However, if you need scripts to actually apply the updates to your Windows images, that's something I can easily provide. In fact, I apply the monthly updates to 25+ Windows editions every month all automatically .

    EDIT: If someone else does have scripts to download updates, I'd love to see how you are doing this. In my case, however, I don't just download the LCU (Latest Cumulative Update). I update my images the correct way by applying the LCU, SSU (Servicing Stack Update), SafeOS Dynamic Update, Setup Dynamic Update, .NET Updates, and CPU Microcode Updates so in my case any script would need to include all of those elements.
      My Computers


  3. Posts : 18,034
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #3

    Hello @kvm,

    kvm said:
    Do you know of any script around which can find the latest cumulative update for a given Windows build, say 1809, parhaps parsing catalog.update.microsoft.com?

    The idea is to slipstream the update in a custom Windows install ISO.

    WU Catalog is an enormous LIVE database. The implications of trying to script this would be a nightmare because of ALL the Parameters involved, especially as you are using an outdated and unsupported version.

    I hope this helps.
      My Computer


  4. Posts : 1,463
    Windows 10 Pro 22H2 64 bit
       #4

    Here is MS History of the updates. Select the version like 1809 and it will list every CU and all the information on each.

    https://support.microsoft.com/en-us/...a-51ff5cbcb059

    Jim
      My Computer


  5. Posts : 4,174
    Windows 11 Pro, 24H2
       #5

    @kvm, what is your end goal? Do you intend to updates images with only the LCU (Latest Cumulative Update) or do you want to do this the right way?

    Either way, I can provide you with detailed guidance. I just need to know exactly what you want to accomplish before I write up a summary / procedure.
      My Computers


  6. Posts : 7,631
    Windows 10 Home 20H2
       #6

    https://docs.microsoft.com/en-us/win...alling-updates

    Searching, Downloading, and Installing Updates
      My Computer


  7. kvm
    Posts : 9
    Window 10 LTSC
    Thread Starter
       #7

    Matthew Wai said:
    https://docs.microsoft.com/en-us/win...alling-updates

    Searching, Downloading, and Installing Updates

    If I understand correctly from the table in the link below, I cannot specify a Windwos version.

    https://docs.microsoft.com/en-us/win...earcher-search


    I think IUpdateSearcher sends a sort of hidden parameter with the version of the system where it is running, which means you can run such a script on Windows 1234 and you find only updates for Windows 1234. Also I am not sure if the query can distinguish the last cumulative updates, which are suitable to be slipstreamed.

    - - - Updated - - -

    Phone Man said:
    Here is MS History of the updates. Select the version like 1809 and it will list every CU and all the information on each.

    https://support.microsoft.com/en-us/...a-51ff5cbcb059

    Jim
    Thank you. I did not know about that. My parsing attempt. But now I don't know the difference between "Cumulative" and "Cumulative preview".

    Code:
    $arch= "x64-based"
    $OS=   "Windows 10"
    $version = "1809" # or $version = "20H2"
    
    # Bootstrap page. Actual version is looked for in the sidebar:
    $uri = "https://support.microsoft.com/en-us/help/4581839"
    $page = iwr $uri
    $links = $page.links | where{$_.class -eq "supLeftNavLink"}
    $vlink = $links | where{$_.innerText -like "*version $version*"}
    Write-Host $vlink.innerText
    $lsupos = [int]$vlink."data-bi-slot" + 1
    $lsu = $links | where{$_."data-bi-slot" -eq $lsupos}
    Write-Host $lsu.innerText
    $lsuhref = $lsu.href -split "/" | select -last 1
    $caturl="https://www.catalog.update.microsoft.com/Search.aspx?q=KB$lsuhref"
    Write-Host $caturl
    
    $catret = iwr  $caturl
    $lastupd= $catret.Links | 
      Where-Object {$_.id -match "_link" -and $_.outerHTML -match "$OS .* $version for $arch System"} |
      Where-Object {$_.outerHTML -notmatch "dynamic cumulative"}
    $id = $lastupd.id -replace "_link" 
    
    # Parse the info win
    $infowin =  @{
        Size      = 0
        Languages = "en-US"
        uidInfo   = $id
        updateID  = $id
    } | ConvertTo-Json -Compress
    
    $infowin = @{ updateIDs = "[$infowin]" }
    $infowin = iwr "https://www.catalog.update.microsoft.com/DownloadDialog.aspx" -Body $infowin
    
    $downlink=$infowin.Content |
      Select-String "http[s]?://download\.windowsupdate\.com/[^']+" | ForEach-Object {$_.Matches.Value}
    Write-Host "Last Cumulative Update:`n"
    echo $downlink
    Any code hilighter, here?

    - - - Updated - - -

    hsehestedt said:
    @kvm, what is your end goal? Do you intend to updates images with only the LCU (Latest Cumulative Update) or do you want to do this the right way?

    Either way, I can provide you with detailed guidance. I just need to know exactly what you want to accomplish before I write up a summary / procedure.
    The idea is to slipstream the cumulative update into my base ISO. Clearly that needs service stack too and other essential updates.

    You can have a look at my attempt based on Phone Man feedback.

    - - - Updated - - -

    Paul Black said:
    Hello @kvm,




    WU Catalog is an enormous LIVE database. The implications of trying to script this would be a nightmare because of ALL the Parameters involved, especially as you are using an outdated and unsupported version.

    I hope this helps.
    Well, WU might work if you have the proper KB, which should be looked for somewhere else.
      My Computer


  8. Posts : 850
    Win 10
       #8

    kvm said:
    But now I don't know the difference between "Cumulative" and "Cumulative preview".
    The cumulative update is a "B" release and the preview update is a "C" release:
    Windows 10 update servicing cadence - Microsoft Tech Community


    Friendly greetings
      My Computer


  9. Posts : 4,174
    Windows 11 Pro, 24H2
       #9

    kvm said:
    The idea is to slipstream the cumulative update into my base ISO. Clearly that needs service stack too and other essential updates.
    If you really want to update it correctly, don't forget the SafeOS update and the Setup Dynamic Update. The WinPE (the boot.wim file) and WinRE (winre.wim found within the install.wim) should also be updated.

    EDIT:

    Here is some more info. These are all the items that should be updated and the order in which to update them. The cells in red apply only if you are dealing with localization, language, font, and feature on demand updates. These are okay to skip, in fact, I never deal with these myself.

    Script to find latest cumulative updates-image1.jpg
      My Computers


  10. kvm
    Posts : 9
    Window 10 LTSC
    Thread Starter
       #10

    hsehestedt said:
    If you really want to update it correctly, don't forget the SafeOS update and the Setup Dynamic Update. The WinPE (the boot.wim file) and WinRE (winre.wim found within the install.wim) should also be updated.

    EDIT:

    Here is some more info. These are all the items that should be updated and the order in which to update them. The cells in red apply only if you are dealing with localization, language, font, and feature on demand updates. These are okay to skip, in fact, I never deal with these myself.

    Script to find latest cumulative updates-image1.jpg

    I have seen that many scripts just update "install.wim". For example, this one by Kari is often mentioned. It is for USB media, but I think the update logic does not change:

    OneDrive

    I don't know the actual implications of updating only install.wim. Perhaps leaving out WinRE means that, in case of recover, you get an outdated version and WinPE is useful only for specific installation types.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:06.
Find Us




Windows 10 Forums