3 Commits

Author SHA1 Message Date
Raphire
ea67435f64 Bump version 2026-02-19 22:45:13 +01:00
Jeffrey
a611e6b128 Update winget check (#484) 2026-02-19 22:44:50 +01:00
Jeffrey
033fa1b8af Fix force remove edge prompt (#483) 2026-02-19 22:26:17 +01:00

View File

@@ -97,7 +97,7 @@ param (
# Define script-level variables & paths # Define script-level variables & paths
$script:Version = "2026.02.18" $script:Version = "2026.02.19"
$script:DefaultSettingsFilePath = "$PSScriptRoot/DefaultSettings.json" $script:DefaultSettingsFilePath = "$PSScriptRoot/DefaultSettings.json"
$script:AppsListFilePath = "$PSScriptRoot/Apps.json" $script:AppsListFilePath = "$PSScriptRoot/Apps.json"
$script:SavedSettingsFilePath = "$PSScriptRoot/LastUsedSettings.json" $script:SavedSettingsFilePath = "$PSScriptRoot/LastUsedSettings.json"
@@ -185,7 +185,7 @@ catch {
# Check if WinGet is installed & if it is, check if the version is at least v1.4 # Check if WinGet is installed & if it is, check if the version is at least v1.4
try { try {
if ([int](((winget -v) -replace 'v','').split('.')[0..1] -join '') -gt 14) { if (Get-Command winget -ErrorAction SilentlyContinue) {
$script:WingetInstalled = $true $script:WingetInstalled = $true
} }
else { else {
@@ -193,6 +193,7 @@ try {
} }
} }
catch { catch {
Write-Error "Unable to determine if WinGet is installed, winget command failed: $_"
$script:WingetInstalled = $false $script:WingetInstalled = $false
} }
@@ -508,7 +509,7 @@ function RemoveApps {
} }
else { else {
# Uninstall app via WinGet # Uninstall app via WinGet
winget uninstall --accept-source-agreements --disable-interactivity --id $app $wingetOutput = winget uninstall --accept-source-agreements --disable-interactivity --id $app
If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) { If (($app -eq "Microsoft.Edge") -and (Select-String -InputObject $wingetOutput -Pattern "Uninstall failed with exit code")) {
Write-ToConsole "Unable to uninstall Microsoft Edge via WinGet" -ForegroundColor Red Write-ToConsole "Unable to uninstall Microsoft Edge via WinGet" -ForegroundColor Red