mirror of
https://github.com/Sycnex/Windows10Debloater.git
synced 2024-11-15 12:13:13 +00:00
Added new function FixWhitelistedApps
I added a new Function called FixWhitelistedApps, which will check to see if any of the Whitelisted Apps were removed, and if so it should re-add them. I then changed the code in the function Start-Debloat, given to me by Reddit user /u/GavinEke.
This commit is contained in:
parent
afa87e6947
commit
8e4d165041
@ -222,12 +222,26 @@ Function Stop-EdgePDF {
|
||||
Set-Item $Edge AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723_ -Verbose
|
||||
}
|
||||
}
|
||||
|
||||
Function FixWhitelistedApps {
|
||||
|
||||
Param([switch]$Debloat)
|
||||
|
||||
If(!(Get-AppxPackage -AllUsers | Select Microsoft.Paint3D, Microsoft.WindowsCalculator, Microsoft.WindowsStore, Microsoft.Windows.Photos)) {
|
||||
|
||||
Get-AppxPackage -allusers Microsoft.Paint3D | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -allusers Microsoft.WindowsCalculator | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
|
||||
Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} } }
|
||||
}
|
||||
|
||||
Write-Output "Initiating Sysprep"
|
||||
Begin-SysPrep
|
||||
Write-Output "Removing bloatware apps."
|
||||
Start-Debloat
|
||||
Write-Output "Removing leftover bloatware registry keys."
|
||||
Remove-Keys
|
||||
Write-Output "Checking to see if any Whitelisted Apps were removed, and if so re-adding them."
|
||||
Write-Output "Stopping telemetry, disabling unneccessary scheduled tasks, and preventing bloatware from returning."
|
||||
Protect-Privacy
|
||||
Write-Output "Stopping Edge from taking over as the default PDF Viewer."
|
||||
|
Loading…
Reference in New Issue
Block a user