mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-01-01 08:56:21 +00:00
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:
11
Get.ps1
11
Get.ps1
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user