mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-06 06:38:31 +00:00
* changed autolinks to now use frontmatter instead off #heading * updated all docs with front matter names * Update DisableLegacyRecovery.md this was the same as EnableLegacyRecovery file * made sure pages have got the corrects scripts on them * Update default.md updated the archetype default to make sure every new page had the title and description automatically on the front matter * Create BraveDebloat.md * added brave debloat link to tweaks.json * Update tweaks.json * Update tweaks.json
30 lines
753 B
Markdown
30 lines
753 B
Markdown
---
|
|
title: "WinGet Reinstall"
|
|
description: ""
|
|
---
|
|
```powershell
|
|
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
|
|
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"
|
|
}
|
|
|
|
}
|
|
```
|