mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-10-08 22:46:50 +00:00
Fix uninstallation of user-scope apps in WinGet with deferred uninstall
This commit is contained in:
@@ -184,6 +184,21 @@ function Show-ApplyModal {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($script:WingetDeferredRemovals -and $script:WingetDeferredRemovals.Count -gt 0) {
|
||||
foreach ($appId in @($script:WingetDeferredRemovals.Keys | Sort-Object)) {
|
||||
$tb = [System.Windows.Controls.TextBlock]::new()
|
||||
$appName = Get-Translation -Key $appId -Field 'FriendlyName' -Section 'Apps'
|
||||
$label = Get-Translation -Key 'ApplyRebootRequiredWingetDeferred' -FormatArgs @($appName)
|
||||
$tb.Text = "$([char]0x2022) $label"
|
||||
$tb.FontSize = 12
|
||||
$tb.SetResourceReference([System.Windows.Controls.TextBlock]::ForegroundProperty, "AppFgColor")
|
||||
$tb.Opacity = 0.85
|
||||
$tb.Margin = [System.Windows.Thickness]::new(0, 2, 0, 0)
|
||||
$applyRebootList.Children.Add($tb) | Out-Null
|
||||
}
|
||||
$applyRebootPanel.Visibility = 'Visible'
|
||||
}
|
||||
|
||||
$applyWindow.Dispatcher.Invoke([System.Windows.Threading.DispatcherPriority]::Render, [action]{})
|
||||
}
|
||||
catch {
|
||||
|
||||
Reference in New Issue
Block a user