2023-03-07 12:28:00 -08:00
|
|
|
function Invoke-WPFInstallUpgrade {
|
|
|
|
|
<#
|
2023-10-19 17:12:55 -05:00
|
|
|
|
|
|
|
|
.SYNOPSIS
|
|
|
|
|
Invokes the function that upgrades all installed programs using winget
|
|
|
|
|
|
2023-03-07 12:28:00 -08:00
|
|
|
#>
|
2024-03-30 11:46:29 -05:00
|
|
|
if((Test-WinUtilPackageManager -winget) -eq "not-installed"){
|
2023-03-07 12:28:00 -08:00
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(Get-WinUtilInstallerProcess -Process $global:WinGetInstall){
|
2024-01-15 11:32:19 -06:00
|
|
|
$msg = "[Invoke-WPFInstallUpgrade] Install process is currently running. Please check for a powershell window labeled 'Winget Install'"
|
2023-03-07 12:28:00 -08:00
|
|
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Update-WinUtilProgramWinget
|
|
|
|
|
|
|
|
|
|
Write-Host "==========================================="
|
|
|
|
|
Write-Host "-- Updates started ---"
|
|
|
|
|
Write-Host "-- You can close this window if desired ---"
|
|
|
|
|
Write-Host "==========================================="
|
2024-03-30 11:46:29 -05:00
|
|
|
}
|