Added Winget Check

- Added Winget check that uses ms-windows-store instead of ms-appinstaller because of CVE-2021-43890
This commit is contained in:
Hayden Plumley 2022-05-16 18:27:25 -07:00 committed by GitHub
parent f7f5ceef25
commit e52f4abada
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -619,6 +619,11 @@ $WPFinstall.Add_Click({
$WPFInstallzoom.IsChecked = $false
}
# If Winget isn't Installed, Open MS Store Window to Install
if (!Get-AppPackage -name 'Microsoft.DesktopAppInstaller') {
Start-Process "ms-windows-store://pdp/?ProductId=9NBLGGH4NNS1"
$nid = (Get-Process AppInstaller).Id; Wait-Process -Id $nid
}
# Install all winget programs in new window
$wingetinstall.ToArray()
# Define Output variable
@ -1729,4 +1734,4 @@ $WPFUpdatessecurity.Add_Click({
#===========================================================================
# Shows the form
#===========================================================================
$Form.ShowDialog() | out-null
$Form.ShowDialog() | out-null