From a611e6b12893ada3dfd42149f43a214fb1fde9c3 Mon Sep 17 00:00:00 2001 From: Jeffrey <9938813+Raphire@users.noreply.github.com> Date: Thu, 19 Feb 2026 22:44:50 +0100 Subject: [PATCH] Update winget check (#484) --- Win11Debloat.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 3496dda..d5e69af 100755 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -185,7 +185,7 @@ catch { # Check if WinGet is installed & if it is, check if the version is at least v1.4 try { - if ([int](((winget -v) -replace 'v','').split('.')[0..1] -join '') -gt 14) { + if (Get-Command winget -ErrorAction SilentlyContinue) { $script:WingetInstalled = $true } else { @@ -193,6 +193,7 @@ try { } } catch { + Write-Error "Unable to determine if WinGet is installed, winget command failed: $_" $script:WingetInstalled = $false }