mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Quickmethod now saves custom settings and app selection #199
Thanks @kylehase!
This commit is contained in:
17
Get.ps1
17
Get.ps1
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user