Now prompts for forceful MS Edge uninstall if Winget fails, regardless of exit code

This commit is contained in:
Raphire
2024-11-26 22:52:45 +01:00
parent d73e90fb9a
commit 5e9cd8a7e7

View File

@@ -353,7 +353,7 @@ function RemoveApps {
# Uninstall app via winget
Strip-Progress -ScriptBlock { winget uninstall --accept-source-agreements --disable-interactivity --id $app } | Tee-Object -Variable wingetOutput
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "93")) {
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
Write-Host "Unable to uninstall Microsoft Edge via Winget" -ForegroundColor Red
Write-Output ""