diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index 64d21e1..3f08303 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -1748,7 +1748,7 @@ function Get-Win32App { New-Item -Path $appFolderPath -ItemType Directory -Force | Out-Null $appFolder = Split-Path -Path $appFolderPath -Leaf WriteLog "Downloading $Win32App..." - $wingetDownloadResult = & winget.exe download --name "$Win32App" --exact --download-directory "$appFolderPath" --scope machine --source winget | Out-String + $wingetDownloadResult = & winget.exe download --name "$Win32App" --exact --download-directory "$appFolderPath" --scope machine --source winget --architecture "$WindowsArch" | Out-String if ($wingetDownloadResult -notmatch "Installer downloaded") { WriteLog "$Win32App did not successfully download." Remove-Item -Path $appFolderPath -Recurse -Force @@ -1793,7 +1793,8 @@ function Get-StoreApp { # Invoke-Process is not used here because it terminates the script if the exit code of the process is not zero. # WinGet's download command will return a non-zero exit code when downloading store apps, as attempting to download the license file always appears to cause an error. WriteLog "Downloading $StoreApp and dependencies..." - $wingetDownloadResult = & winget.exe download --name --exact "$StoreApp" --download-directory "$appFolderPath" --accept-package-agreements --accept-source-agreements --source msstore | Out-String + WriteLog 'MSStore app downloads require authentication with an Entra ID account. You may be prompted twice for credentials, once for the app and another for the license file.' + $wingetDownloadResult = & winget.exe download --name --exact "$StoreApp" --download-directory "$appFolderPath" --accept-package-agreements --accept-source-agreements --source msstore --architecture "$WindowsArch" --scope machine | Out-String # Many store apps can be found by winget search, but the download of the apps are unsupported. if ($wingetDownloadResult -match "No applicable Microsoft Store package download information found.") { WriteLog "No applicable Microsoft Store package download information found for $StoreApp. Skipping download." @@ -1807,7 +1808,7 @@ function Get-StoreApp { Set-Content -Path "$AppsPath\InstallAppsandSysprep.cmd" -Value $updatedcmdContent } WriteLog "$StoreApp has completed downloading. Identifying the latest version of $StoreApp." - $packages = Get-ChildItem -Path "$appFolderPath\*" -Exclude "Dependencies\*" -File + $packages = Get-ChildItem -Path "$appFolderPath\*" -Exclude "Dependencies\*", "*.xml", "*.yaml" -File # WinGet downloads multiple versions of certain store apps. The latest version of the package will be determined based on the date of the file signature. $latestPackage = "" $latestDate = [datetime]::MinValue