Bladeren bron

Fixed IfElse that disables People/PeopleBand

I added the suggested IfElse that disables the People/PeopleBand per issue number #76
Richard Newton 6 jaren geleden
bovenliggende
commit
8f353b1059
1 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 4 3
      Windows10Debloater.ps1

+ 4 - 3
Windows10Debloater.ps1

@@ -268,12 +268,13 @@ Function Protect-Privacy {
     Set-ItemProperty $LocationConfig Status -Value 0 
     Set-ItemProperty $LocationConfig Status -Value 0 
         
         
     #Disables People icon on Taskbar
     #Disables People icon on Taskbar
+        #Disables People icon on Taskbar
     Write-Output "Disabling People icon on Taskbar"
     Write-Output "Disabling People icon on Taskbar"
-    $People = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People"    
+    $People = 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People'
     If (!(Test-Path $People)) {
     If (!(Test-Path $People)) {
-        New-Item $People
+        mkdir $People -ErrorAction SilentlyContinue
+        New-ItemProperty $People -Name PeopleBand -Value 0 -Verbose
     }
     }
-    Set-ItemProperty $People  PeopleBand -Value 0 
         
         
     #Disables scheduled tasks that are considered unnecessary 
     #Disables scheduled tasks that are considered unnecessary 
     Write-Output "Disabling scheduled tasks"
     Write-Output "Disabling scheduled tasks"