Selaa lähdekoodia

Same Fix as Windows10Debloater.ps1 for Cloudstore

It allows to delete cloudstore without confirm needed
John Neijzen 5 vuotta sitten
vanhempi
sitoutus
12e321e5fe
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      Windows10SysPrepDebloater.ps1

+ 2 - 2
Windows10SysPrepDebloater.ps1

@@ -174,10 +174,10 @@ Function Protect-Privacy {
     
     
     
     
      Write-Output "Removing CloudStore from registry if it exists"
      Write-Output "Removing CloudStore from registry if it exists"
-     $CloudStore = 'HKCUSoftware\Microsoft\Windows\CurrentVersion\CloudStore'
+     $CloudStore = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore'
      If (Test-Path $CloudStore) {
      If (Test-Path $CloudStore) {
      Stop-Process Explorer.exe -Force
      Stop-Process Explorer.exe -Force
-     Remove-Item $CloudStore
+     Remove-Item $CloudStore -Recurse -Force
      Start-Process Explorer.exe -Wait
      Start-Process Explorer.exe -Wait
     }
     }