diff --git a/functions/public/Invoke-WPFButton.ps1 b/functions/public/Invoke-WPFButton.ps1 index 826ba1241f..e17a349c47 100644 --- a/functions/public/Invoke-WPFButton.ps1 +++ b/functions/public/Invoke-WPFButton.ps1 @@ -46,6 +46,7 @@ function Invoke-WPFButton { "WPFPaneluser" {Invoke-WPFControlPanel -Panel $button} "WPFUpdatesdefault" {Invoke-WPFUpdatesdefault} "WPFFixesUpdate" {Invoke-WPFFixesUpdate} + "WPFFixesWinget" {Invoke-WPFFixesWinget} "WPFFixesNetwork" {Invoke-WPFFixesNetwork} "WPFUpdatesdisable" {Invoke-WPFUpdatesdisable} "WPFUpdatessecurity" {Invoke-WPFUpdatessecurity} diff --git a/functions/public/Invoke-WPFFixesWinget.ps1 b/functions/public/Invoke-WPFFixesWinget.ps1 new file mode 100644 index 0000000000..36a8afaba8 --- /dev/null +++ b/functions/public/Invoke-WPFFixesWinget.ps1 @@ -0,0 +1,13 @@ +function Invoke-WPFFixesWinget { + + <# + + .SYNOPSIS + Fixes Winget by running choco install winget + .DESCRIPTION + BravoNorris for the fantastic idea of a button to reinstall winget + #> + + Start-Process -FilePath "choco" -ArgumentList "install winget -y" -NoNewWindow -Wait + +} \ No newline at end of file diff --git a/winutil.ps1 b/winutil.ps1 index 5ac5a1be45..82708f743f 100755 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -1927,6 +1927,7 @@ function Invoke-WPFButton { "WPFPaneluser" {Invoke-WPFControlPanel -Panel $button} "WPFUpdatesdefault" {Invoke-WPFUpdatesdefault} "WPFFixesUpdate" {Invoke-WPFFixesUpdate} + "WPFFixesWinget" {Invoke-WPFFixesWinget} "WPFFixesNetwork" {Invoke-WPFFixesNetwork} "WPFUpdatesdisable" {Invoke-WPFUpdatesdisable} "WPFUpdatessecurity" {Invoke-WPFUpdatessecurity} @@ -2114,6 +2115,19 @@ Write-Host "12) Forcing discovery..." Write-Host "-- Reset All Windows Update Settings to Stock -" Write-Host "===============================================" } +function Invoke-WPFFixesWinget { + + <# + + .SYNOPSIS + Fixes Winget by running choco install winget + .DESCRIPTION + BravoNorris for the fantastic idea of a button to reinstall winget + #> + + Start-Process -FilePath "choco" -ArgumentList "install winget -y" -NoNewWindow -Wait + +} Function Invoke-WPFFormVariables { <# @@ -2497,7 +2511,7 @@ function Invoke-WPFMicrowin { } else { - Write-Host "Path to drivers is invaliad continuing without driver injection" + Write-Host "Path to drivers is invalid continuing without driver injection" } } @@ -4387,6 +4401,7 @@ $inputXML = '