Files
winutil/docs/content/dev/features/Fixes/Winget.md
T

28 lines
723 B
Markdown
Raw Normal View History

2026-01-07 19:55:35 +00:00
# WinGet Reinstall
2026-01-29 19:59:26 +00:00
```powershell
2026-01-07 19:55:35 +00:00
function Invoke-WPFFixesWinget {
<#
.SYNOPSIS
Fixes Winget by running choco install winget
.DESCRIPTION
BravoNorris for the fantastic idea of a button to reinstall winget
#>
# Install Choco if not already present
2026-01-14 20:28:45 +02:00
try {
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
Write-Host "==> Starting Winget Repair"
Install-WinUtilWinget -Force
} catch {
Write-Error "Failed to install winget: $_"
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
} finally {
Write-Host "==> Finished Winget Repair"
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
}
2026-01-07 19:55:35 +00:00
}
```