Refactor: Cleanup app removal, remove legacy app list generator and CustomAppsList file support (#662)

* remove support for uninstalling old sunset apps

* Add color legend on app removal screen

* Remove legacy app list generator and custom apps file support
Replaced by GUI config export/import, dynamic RemovalMethod, and
CLI app removal settings saved to LastUsedSettings.json.

* Verify app removal by checking actual installation state instead of trusting winget output
This commit is contained in:
Jeffrey
2026-06-22 22:13:01 +02:00
committed by GitHub
parent 71e3f2e44d
commit d1fe541b62
22 changed files with 865 additions and 477 deletions

View File

@@ -1,4 +1,17 @@
# Prints all pending changes that will be made by the script
<#
.SYNOPSIS
Prints a summary of all pending changes to the console for the user to review.
.DESCRIPTION
Iterates over every non-control parameter in $script:Params and emits a
human-readable line for each change that will be applied. For the
'RemoveApps' parameter the list of targeted app names is displayed
inline. Feature labels are resolved from Features.json when available;
otherwise the raw parameter name is used as a fallback.
After printing the summary the function pauses until the user presses
Enter, giving them an opportunity to review and cancel via Ctrl+C.
#>
function PrintPendingChanges {
Write-Output "Win11Debloat will make the following changes:"
@@ -31,19 +44,6 @@ function PrintPendingChanges {
Write-Host $appsList -ForegroundColor DarkGray
continue
}
'RemoveAppsCustom' {
$appsList = LoadAppsFromFile $script:CustomAppsListFilePath
if ($appsList.Count -eq 0) {
Write-Host "No valid apps were selected for removal" -ForegroundColor Yellow
Write-Output ""
continue
}
Write-Output "- Remove $($appsList.Count) apps:"
Write-Host $appsList -ForegroundColor DarkGray
continue
}
default {
if ($script:Features -and $script:Features.ContainsKey($parameterName)) {
$message = $script:Features[$parameterName].Label