Quickmethod now saves custom settings and app selection #199

Thanks @kylehase!
This commit is contained in:
Raphire
2024-09-29 12:32:07 +02:00
parent a6ffbdf53f
commit 63a017d620

17
Get.ps1
View File

@@ -60,11 +60,11 @@ Write-Output "> Downloading Win11Debloat..."
# Download latest version of Win11Debloat from github as zip archive
Invoke-WebRequest http://github.com/raphire/win11debloat/archive/master.zip -OutFile "$env:TEMP/win11debloat-temp.zip"
# Remove old script folder if it exists
if (Test-Path "$env:TEMP/Win11Debloat") {
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
if (Test-Path "$env:TEMP/Win11Debloat/Win11Debloat-master") {
Write-Output ""
Write-Output "> Cleaning up old Win11Debloat folder..."
Remove-Item -LiteralPath "$env:TEMP/Win11Debloat" -Force -Recurse
Get-ChildItem -Path "$env:TEMP/Win11Debloat/Win11Debloat-master" -Exclude CustomAppsList,SavedSettings | Remove-Item -Recurse -Force
}
Write-Output ""
@@ -90,10 +90,13 @@ if ($null -ne $debloatProcess) {
$debloatProcess.WaitForExit()
}
Write-Output ""
Write-Output "> Cleaning up..."
# Remove all remaining script files, except for CustomAppsList and SavedSettings files
if (Test-Path "$env:TEMP/Win11Debloat/Win11Debloat-master") {
Write-Output ""
Write-Output "> Cleaning up..."
# Cleanup, remove Win11Debloat directory
Remove-Item -LiteralPath "$env:TEMP/Win11Debloat" -Force -Recurse
# Cleanup, remove Win11Debloat directory
Get-ChildItem -Path "$env:TEMP/Win11Debloat/Win11Debloat-master" -Exclude CustomAppsList,SavedSettings | Remove-Item -Recurse -Force
}
Write-Output ""