Improves Winget installer selection logic

Refines the post-download cleanup process for applications with multiple installers.

When multiple installers are downloaded for an application, this change introduces logic to select the most appropriate one based on the target Windows architecture. It prioritizes universal installers first, then architecture-specific installers, before falling back to the previous method of selecting the newest file by signature date.

This ensures a more accurate installer is chosen, especially when Winget provides multiple architecture options for a single package.
This commit is contained in:
rbalsleyMSFT
2025-08-22 17:33:09 -07:00
parent 7d4567efbe
commit 3f892493c0
3 changed files with 85 additions and 27 deletions
@@ -163,6 +163,7 @@ function Invoke-ParallelProcessing {
AppsPath = $localJobArgs['AppsPath']
OrchestrationPath = $localJobArgs['OrchestrationPath']
ProgressQueue = $localProgressQueue
SelectedWindowsArch = $localJobArgs['SelectedWindowsArch']
}
$taskResult = Start-WingetAppDownloadTask @wingetTaskArgs
if ($null -ne $taskResult) {