Files
winutil/functions/public/Invoke-WPFInstallUpgrade.ps1
T
Gabi a3f57532b6 Cleanup winget upgrade (#4410)
* Update Update-WinUtilProgramWinget.ps1

* Delete functions/private/Update-WinUtilProgramWinget.ps1

* Delete functions/private/Get-WinUtilInstallerProcess.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1

* Update Invoke-WPFInstallUpgrade.ps1
2026-05-05 15:16:39 -05:00

22 lines
1.0 KiB
PowerShell

function Invoke-WPFInstallUpgrade {
if ($sync.ChocoRadioButton.IsChecked) {
Install-WinUtilChoco # Ensure Chocolatey is installed before upgrading
Write-Host "==========================================="
Write-Host "-- Updates started ---"
Write-Host "-- You can close this window if desired ---"
Write-Host "==========================================="
Start-Process -FilePath powershell.exe -ArgumentList 'choco upgrade all -y'
} else {
Install-WinUtilWinget # Ensure WinGet is installed before upgrading
Write-Host "==========================================="
Write-Host "-- Updates started ---"
Write-Host "-- You can close this window if desired ---"
Write-Host "==========================================="
Start-Process -FilePath powershell.exe -ArgumentList 'winget upgrade --all --include-unknown --silent --accept-source-agreements --accept-package-agreements'
}
}