The problem is still present. The script correctly detects KB5121003 as the latest LCU, but it is not written to all.txt. Instead, all.txt contains KB5043080 twice — once as L1 and again as L2, with the exact same URL. FetchUpdates.ps1 then downloads the same KB5043080 file twice. The log confirms this.
Thank you. The new test_all.txt looks correct now. I will replace my current GenerateUpdateList.ps1 with the new file and test it again through the full FetchUpdates.ps1, GenerateUpdateList.ps1 workflow. I will report the result. For reference, here is the exact code from my Integrator that calls FetchUpdates.ps1. I am posting the complete block so you can see the full command line and all parameters used in my environment. I have not changed anything in the script itself. Maybe the -ScriptDir parameter or the way FetchUpdates.ps1 calls GenerateUpdateList.ps1 is relevant to the different result I am getting. Code: echo. echo ------------------------------------------------------------ echo Auto-detecting build + downloading updates echo ------------------------------------------------------------ echo. powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0Tools\%HostArchitecture%\FetchUpdates.ps1' -Mount '%MountDir%' -ScriptDir '%~dp0Tools\%HostArchitecture%' -OutDir '%~dp0UUP' -DismPath '%DISM11%' -ScratchDir '%~dp0UUP\Scratch' -NoIntegrate" if errorlevel 1 ( echo. echo ------------------------------------------------------------ echo ERROR: Update download failed. echo ------------------------------------------------------------ echo. pause goto End ) echo. echo ------------------------------------------------------------ echo Running W10UI.cmd Integrating Updates to image echo ------------------------------------------------------------ echo. CALL "%~dp0W10UI.cmd"
This script is no longer relevant today; I update my script every day. But I want to stop my desires, but I don't know how.
Hi guys, I know that getting GenerateUpdate.ps1 to work with so many options is a truly Herculean task. Since I’m not a PowerShell expert, I’ll just offer a suggestion. You could initially set aside the L1_Windows11.0-KB5043080-x64.msu file and run the full process for the latest LCU for any build. Then, at the end of the script, you could add a static link for the L1 file specifically for build 26100. That might make it easier to achieve a good result. It’s just a suggestion; I plan to use the manual method until the script is error-free. I’m very grateful for the cooperation of everyone involved with the script. Best regards,
Thank you! I tested the build with two different Windows 11 24H2 images, and everything is working correctly now. The update list was generated successfully with the correct LCU, .NET Framework update, and SafeOS Dynamic Update. I also noticed the new KB validation and retry mechanism working as expected - it detected the incorrect URL and retried until the correct KB5121003 URL was obtained. Both tests completed successfully. Great work and thank you for fixing this! I would also like to sincerely thank otvertka for all his hard work, patience, persistence, and dedication. I really appreciate the time and effort he has put into this project, and especially his willingness to keep working on the issues until they are resolved. Your persistence and commitment are truly appreciated. Thank you very much for everything you are doing!
Hello, @SunLion I’ve combined everything you mentioned into a single file and configured it to apply to all versions—specifically, L1_KB5043080 has been statically set for 24H2. Therefore, you need to manually place this update file in the UUP folder as "L1_Windows11. 0-KB5043080-x64.msu." The rest will be pulled from Microsoft’s update list via scanning, and the newest or most up-to-date file will be added to the UUP folder as L2_.......... .msu. In other versions, such as 25H2, 26H1, or 26H2, there is no L1 or L2 check; the latest file is written directly to the all.txt file. The most recent error-checking feature has also prevented incorrect entries, so it’s stable right now. I also tested it on 24H2—no issues, it works.
I ran a test using the latest GenerateUpdateList.ps1 you posted plus _PreDownloadAllUpdates_TEST.cmd, and I got the attached "_PreDownloadAllUpdates_TEST_process.txt" result. Did I do something wrong? EDIT (New test) I just ran another test, and yes, you did it correctly this time. It downloaded the latest LCU and everything. I'm not sure why the first test wasn't successful... See the attachment Test2.7z
So, I've been messing around with this KB5043080 for a while now, and so I decided to make things easier. This way, the latest updates are installed automatically, and this unnecessary KB5043080 isn't installed in 25H2: Code: cd /d "%~dp0" echo. echo ############################################################ echo == Running W10UI_10.62 Integrating Updates to image == echo ############################################################ echo. echo Auto-detecting build + downloading updates powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0Data\Scripts\FetchUpdates.ps1' -Mount '%MountDir%' -ScriptDir '%~dp0Data\Scripts' -OutDir '%~dp0Data\UUP' -DismPath '%DISM%' -ScratchDir '%~dp0Data\Scratch' -NoIntegrate" echo. echo == Removing KB5043080 if the image version is 25H2 == if exist "%~dp0Data\UUP\*KB5043080*.msu" move /y "%~dp0Data\UUP\*KB5043080*.msu" "%~dp0Data\Temp" >nul 2>&1 echo note: Alternative option remove KB5043080 (via variable): set "FILE=*KB5043080*.msu" if exist "%~dp0Data\UUP\%FILE%" move /y "%~dp0Data\UUP\%FILE%" "%~dp0Data\Temp" >nul 2>&1 echo. echo == Copying the update file if version 25H2 == (note: In this line about Windows11.0-KB5054156-x64.msu to get the version I need from 26100.хххх version 26200.хххх) if exist "%~dp0Data\UUP\25H2\*.msu" copy /y "%~dp0Data\UUP\25H2\*.msu" "%~dp0Data\UUP" echo. call "%~dp0Data\Scripts\W10UI.cmd" echo. :: restore title title %title% In this version, everything works as I need it to.
Hello, SanLion. You try this new GenerateUpdateList_L2_only.zip and FetchUpdates.zip 1. GenerateUpdateList.ps1 Modified: L1 KB5043080 download URL is blocked. The script no longer downloads the L1 package and only generates the current L2/LCU, .NET and SafeOS updates. 2. FetchUpdates.ps1 Modified: L1 KB5043080 is excluded from stale-file cleanup, so the existing L1 .msu file is not deleted from the UUP folder. In short: L1 is no longer downloaded, but an existing L1 package is preserved for manual extraction and processing. FetchUpdates.ps1 It was like this Code: # ---- 4) delete STALE update files (root *.msu/*.cab not in the new list) ---- Write-Host "[*] Removing stale update files (old versions)..." $removed = 0 Get-ChildItem -LiteralPath $OutDir -File -ErrorAction SilentlyContinue | Where-Object { ($_.Extension -ieq '.msu' -or $_.Extension -ieq '.cab') -and -not $wanted.ContainsKey($_.Name.ToLower()) } | ForEach-Object { Write-Host (" remove old: {0}" -f $_.Name); Remove-Item -LiteralPath $_.FullName -Force -ErrorAction SilentlyContinue; $removed++ } if ($removed -eq 0) { Write-Host " (none)" } FetchUpdates.ps1 It became so Code: # ---- 4) delete STALE update files (root *.msu/*.cab not in the new list) ---- Write-Host "[*] Removing stale update files (old versions)..." $removed = 0 Get-ChildItem -LiteralPath $OutDir -File -ErrorAction SilentlyContinue | Where-Object { ($_.Extension -ieq '.msu' -or $_.Extension -ieq '.cab') -and $_.Name -ine 'L1_Windows11.0-KB5043080-x64.msu' -and -not $wanted.ContainsKey($_.Name.ToLower()) } | ForEach-Object { Write-Host (" remove old: {0}" -f $_.Name); Remove-Item -LiteralPath $_.FullName -Force -ErrorAction SilentlyContinue; $removed++ } if ($removed -eq 0) { Write-Host " (none)" }
Code: echo. echo ------------------------------------------------------------ echo Auto-detecting build + downloading updates echo ------------------------------------------------------------ echo. Powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0Tools\%HostArchitecture%\FetchUpdates.ps1' -Mount '%MountDir%' -ScriptDir '%~dp0Tools\%HostArchitecture%' -OutDir '%~dp0UUP' -DismPath '%DISM11%' -ScratchDir '%~dp0UUP\Scratch' -NoIntegrate" if errorlevel 1 ( echo. echo ------------------------------------------------------------ echo ERROR: Update download failed. echo ------------------------------------------------------------ echo. PAUSE >nul goto End ) echo. echo ------------------------------------------------------------ echo Running W10UI.cmd Integrating Updates to image echo ------------------------------------------------------------ echo. CALL "%~dp0W10UI.cmd" GenerateUpdateList.ps1 creates a list of updates, and FetchUpdates.ps1 uses this list to download updates. Thus, these are two separate scripts, but they run as part of the same update process.
Hi SunLion! If you are interested, I can show you how I implemented the update installation process in my scenario, including the extraction and reinstallation of the updates. This is just my temporary workaround for the current situation, purely for transparency, so you can see exactly how I implemented it.
Thank you so much. You're great. This is very important!!! It will make it easier to develop workarounds. I'll publish them later if anyone's interested.