Refactor WinGet app handling and add command overrides

Improves the reliability of WinGet app processing by making several key changes.

The build process now deletes the `WinGetWin32Apps.json` file before each run to ensure it is always freshly generated.

The UI no longer relies on `WinGetWin32Apps.json` to detect previously downloaded content. Instead, it checks directly for the application's content on disk, preventing unnecessary re-downloads.

This change also introduces a feature allowing users to override the default silent install commands for Win32 apps. By specifying `CommandLine` or `Arguments` properties in `AppList.json`, these values will be used to update the corresponding entries in `WinGetWin32Apps.json` during the build process.
This commit is contained in:
rbalsleyMSFT
2025-08-21 16:46:17 -07:00
parent 9aed707a77
commit 7d4567efbe
3 changed files with 123 additions and 65 deletions
+7
View File
@@ -5871,6 +5871,13 @@ if ($AllowVHDXCaching) {
throw $_
}
}
# Remove WinGetWin32Apps.json so it is always rebuilt next run
if (Test-Path -Path $wingetWin32jsonFile -PathType Leaf) {
WriteLog "Removing $wingetWin32jsonFile"
Remove-Item -Path $wingetWin32jsonFile -Force -ErrorAction SilentlyContinue
WriteLog "Removal complete"
}
#Set $LongPathsEnabled registry value back to original value. $LongPathsEnabled could be $null if the registry value was not found
if ($null -eq $LongPathsEnabled) {
Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -ErrorAction SilentlyContinue