mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-29 01:11:30 -06:00
Fixing an issue related to winget install & Improving winget uninstall command (#1662)
* Add the argument '--accept-source-agreements' to the Uninstall command of Winget Added '--accept-source-agreements' to insure that the Package Uninstall process is completely unattended. * Improve the Wording of the 'WPFInstall' function and 'inputXML.xaml' file
This commit is contained in:
parent
1337ac4359
commit
14d6d07dc7
@ -33,12 +33,12 @@ Function Install-WinUtilProgramWinget {
|
||||
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --scope=machine --silent $Program" -NoNewWindow -Wait
|
||||
}
|
||||
if($manage -eq "Uninstalling"){
|
||||
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait
|
||||
}
|
||||
Start-Process -FilePath winget -ArgumentList "uninstall -e --accept-source-agreements --purge --force --silent $Program" -NoNewWindow -Wait
|
||||
}
|
||||
|
||||
$X++
|
||||
}
|
||||
|
||||
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,12 +2,12 @@ function Invoke-WPFInstall {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Installs the selected programs using winget
|
||||
Installs the selected programs using winget, if one or more of the selected programs are already installed on the system, winget will try and perform an upgrade if there's a newer version to install.
|
||||
|
||||
#>
|
||||
|
||||
if($sync.ProcessRunning){
|
||||
$msg = "[Invoke-WPFInstall] Install process is currently running."
|
||||
$msg = "[Invoke-WPFInstall] An Install process is currently running."
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||
return
|
||||
}
|
||||
@ -15,7 +15,7 @@ function Invoke-WPFInstall {
|
||||
$WingetInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||
|
||||
if ($wingetinstall.Count -eq 0) {
|
||||
$WarningMsg = "Please select the program(s) to install"
|
||||
$WarningMsg = "Please select the program(s) to install or upgrade"
|
||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||
return
|
||||
}
|
||||
@ -41,4 +41,4 @@ function Invoke-WPFInstall {
|
||||
Start-Sleep -Seconds 5
|
||||
$sync.ProcessRunning = $False
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -690,7 +690,7 @@
|
||||
<RowDefinition Height="0.95*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
||||
<Button Name="WPFinstall" Content=" Install Selected" Margin="2" />
|
||||
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
||||
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
||||
<Button Name="WPFuninstall" Content=" Uninstall Selection" Margin="2"/>
|
||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||
|
Loading…
Reference in New Issue
Block a user