From 2b84059b0146674fb3fb20ce128fdab0172df245 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Mon, 30 Oct 2023 01:58:00 +0100 Subject: [PATCH] -AllUsers for Get-AppxPackage --- Winget-AutoUpdate-Install.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Winget-AutoUpdate-Install.ps1 b/Winget-AutoUpdate-Install.ps1 index 2e736b8..f6f95cf 100644 --- a/Winget-AutoUpdate-Install.ps1 +++ b/Winget-AutoUpdate-Install.ps1 @@ -220,7 +220,7 @@ function Install-WinGet { } #Downloading and Installing Dependencies in SYSTEM context - if (!(Get-AppxPackage -Name 'Microsoft.UI.Xaml.2.7')) { + if (!(Get-AppxPackage -Name 'Microsoft.UI.Xaml.2.7' -AllUsers)) { Write-ToLog "-> Downloading Microsoft.UI.Xaml.2.7..." $UiXamlUrl = "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.0" $UiXamlZip = "$WingetUpdatePath\Microsoft.UI.XAML.2.7.zip" @@ -238,7 +238,7 @@ function Install-WinGet { Remove-Item -Path "$WingetUpdatePath\extracted" -Force -Recurse } - if (!(Get-AppxPackage -Name 'Microsoft.VCLibs.140.00.UWPDesktop')) { + if (!(Get-AppxPackage -Name 'Microsoft.VCLibs.140.00.UWPDesktop' -AllUsers)) { Write-ToLog "-> Downloading Microsoft.VCLibs.140.00.UWPDesktop..." $VCLibsUrl = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" $VCLibsFile = "$WingetUpdatePath\Microsoft.VCLibs.x64.14.00.Desktop.appx"