Skip to content

Commit

Permalink
Merge pull request Romanitho#455 from KnifMelti/fix
Browse files Browse the repository at this point in the history
-AllUsers for Get-AppxPackage
  • Loading branch information
Romanitho authored Oct 30, 2023
2 parents c360ff3 + 2b84059 commit be98907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Winget-AutoUpdate-Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit be98907

Please sign in to comment.