Use Install-WinUtilWinget function instead of choco

This commit is contained in:
Chris Titus
2026-01-05 16:09:02 -06:00
parent be415051ca
commit a1907f5dee

View File

@@ -10,8 +10,8 @@ function Invoke-WPFFixesWinget {
# Install Choco if not already present # Install Choco if not already present
try { try {
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
Install-WinUtilChoco Write-Host "==> Starting Winget Repair"
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait Install-WinUtilWinget -Force
} catch { } catch {
Write-Error "Failed to install winget: $_" Write-Error "Failed to install winget: $_"
Set-WinUtilTaskbaritem -state "Error" -overlay "warning" Set-WinUtilTaskbaritem -state "Error" -overlay "warning"