浏览代码

OEM and Preinstalled app locations

Added more OEM and preinstalled app locations to removal of bloatware in Reg Key section.
Gray-0men 7 年之前
父节点
当前提交
af3cc3cab4
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      Windows10Debloater.ps1

+ 11 - 0
Windows10Debloater.ps1

@@ -34,6 +34,7 @@ Function Start-Debloat {
     Get-AppxPackage -AllUsers | Where-Object {$_.Name -NotMatch $WhitelistedApps} | Remove-AppxPackage
     Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -NotMatch $WhitelistedApps} | Remove-AppxProvisionedPackage -Online
 }
+
 Function Remove-Keys {
         
     [CmdletBinding()]
@@ -117,9 +118,19 @@ Function Protect-Privacy {
     Write-Output "Adding Registry key to prevent bloatware apps from returning"
     #Prevents bloatware applications from returning
     $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
+    $registryOEM = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
     If (!(Test-Path $registryPath)) {
         Mkdir $registryPath 
         New-ItemProperty $registryPath -Name DisableWindowsConsumerFeatures -Value 1 -Verbose 
+    }
+    If (!(Test-Path $registryOEM)) {
+        Mkdir $registryOEM
+        Set-ItemProperty $registryOEM -Name ContentDeliveryAllowed -Value 0 -Verbose
+        Set-ItemProperty $registryOEM -Name OemPreInstalledAppsEnabled -Value 0 -Verbose
+        Set-ItemProperty $registryOEM -Name PreInstalledAppsEnabled -Value 0 -Verbose
+        Set-ItemProperty $registryOEM -Name PreInstalledAppsEverEnabled -Value 0 -Verbose
+        Set-ItemProperty $registryOEM -Name SilentInstalledAppsEnabled -Value 0 -Verbose
+        Set-ItemProperty $registryOEM -Name SystemPaneSuggestionsEnabled -Value 0 -Verbose
     }          
         
     Write-Output "Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings"