Improved app removal via cmdline, add JSON config files (#402)

* Add support for removing specific apps via commandline

* Add default and last used settings JSON config files (#362)

---------

Co-authored-by: soulcloude00 <soulcloude00@gmail.com>
Co-authored-by: haresh <h92811311@gmail.com>
Co-authored-by: Sashank <hello@sashank.wiki>
This commit is contained in:
Jeffrey
2025-12-26 20:36:51 +01:00
committed by GitHub
parent 48cd513f14
commit e612f8e9d5
6 changed files with 877 additions and 353 deletions

11
Get.ps1
View File

@@ -9,7 +9,8 @@ param (
[switch]$RunDefaults,
[switch]$RunDefaultsLite,
[switch]$RunSavedSettings,
[switch]$RemoveApps,
[string]$Apps,
[switch]$RemoveApps,
[switch]$RemoveAppsCustom,
[switch]$RemoveGamingApps,
[switch]$RemoveCommApps,
@@ -103,11 +104,11 @@ catch {
Exit
}
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
# Remove old script folder if it exists, except for CustomAppsList and LastUsedSettings.json files
if (Test-Path "$env:TEMP/Win11Debloat") {
Write-Output ""
Write-Output "> Cleaning up old Win11Debloat folder..."
Get-ChildItem -Path "$env:TEMP/Win11Debloat" -Exclude CustomAppsList,SavedSettings,Win11Debloat.log | Remove-Item -Recurse -Force
Get-ChildItem -Path "$env:TEMP/Win11Debloat" -Exclude CustomAppsList,LastUsedSettings.json,Win11Debloat.log | Remove-Item -Recurse -Force
}
Write-Output ""
@@ -143,13 +144,13 @@ if ($null -ne $debloatProcess) {
$debloatProcess.WaitForExit()
}
# Remove all remaining script files, except for CustomAppsList and SavedSettings files
# Remove all remaining script files, except for CustomAppsList and LastUsedSettings.json files
if (Test-Path "$env:TEMP/Win11Debloat") {
Write-Output ""
Write-Output "> Cleaning up..."
# Cleanup, remove Win11Debloat directory
Get-ChildItem -Path "$env:TEMP/Win11Debloat" -Exclude CustomAppsList,SavedSettings,Win11Debloat.log | Remove-Item -Recurse -Force
Get-ChildItem -Path "$env:TEMP/Win11Debloat" -Exclude CustomAppsList,LastUsedSettings.json,Win11Debloat.log | Remove-Item -Recurse -Force
}
Write-Output ""