mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
Quickmethod now saves custom settings and app selection #199
Thanks @kylehase!
This commit is contained in:
11
Get.ps1
11
Get.ps1
@@ -60,11 +60,11 @@ Write-Output "> Downloading Win11Debloat..."
|
|||||||
# Download latest version of Win11Debloat from github as zip archive
|
# 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"
|
Invoke-WebRequest http://github.com/raphire/win11debloat/archive/master.zip -OutFile "$env:TEMP/win11debloat-temp.zip"
|
||||||
|
|
||||||
# Remove old script folder if it exists
|
# Remove old script folder if it exists, except for CustomAppsList and SavedSettings files
|
||||||
if (Test-Path "$env:TEMP/Win11Debloat") {
|
if (Test-Path "$env:TEMP/Win11Debloat/Win11Debloat-master") {
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
Write-Output "> Cleaning up old Win11Debloat folder..."
|
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 ""
|
Write-Output ""
|
||||||
@@ -90,10 +90,13 @@ if ($null -ne $debloatProcess) {
|
|||||||
$debloatProcess.WaitForExit()
|
$debloatProcess.WaitForExit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove all remaining script files, except for CustomAppsList and SavedSettings files
|
||||||
|
if (Test-Path "$env:TEMP/Win11Debloat/Win11Debloat-master") {
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
Write-Output "> Cleaning up..."
|
Write-Output "> Cleaning up..."
|
||||||
|
|
||||||
# Cleanup, remove Win11Debloat directory
|
# Cleanup, remove Win11Debloat directory
|
||||||
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 ""
|
Write-Output ""
|
||||||
|
|||||||
Reference in New Issue
Block a user