Skip to content

Commit

Permalink
winget reinstall addition
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTitusTech committed Nov 28, 2023
1 parent ab4d132 commit 3e61c74
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions functions/public/Invoke-WPFButton.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
13 changes: 13 additions & 0 deletions functions/public/Invoke-WPFFixesWinget.ps1
Original file line number Diff line number Diff line change
@@ -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

}
17 changes: 16 additions & 1 deletion winutil.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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 {
<#
Expand Down Expand Up @@ -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"
}
}

Expand Down Expand Up @@ -4387,6 +4401,7 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
<Button Name="WPFFixesUpdate" FontSize="14" Content="Reset Windows Update" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
<Button Name="WPFFixesNetwork" FontSize="14" Content="Reset Network" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
<Button Name="WPFPanelDISM" FontSize="14" Content="System Corruption Scan" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
<Button Name="WPFFixesWinget" FontSize="14" Content="WinGet Reinstall" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
</StackPanel>
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="1" Margin="10,5">
<Label Content="Legacy Windows Panels" FontSize="16"/>
Expand Down
1 change: 1 addition & 0 deletions xaml/inputXML.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@
<Button Name="WPFFixesUpdate" FontSize="14" Content="Reset Windows Update" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
<Button Name="WPFFixesNetwork" FontSize="14" Content="Reset Network" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
<Button Name="WPFPanelDISM" FontSize="14" Content="System Corruption Scan" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
<Button Name="WPFFixesWinget" FontSize="14" Content="WinGet Reinstall" HorizontalAlignment = "Left" Margin="5,2" Padding="20,5" Width="300"/>
</StackPanel>
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="1" Margin="10,5">
<Label Content="Legacy Windows Panels" FontSize="16"/>
Expand Down

0 comments on commit 3e61c74

Please sign in to comment.