Sycnex / Windows10Debloater

Script to remove Windows 10 bloatware.
MIT License
18.16k stars 2.04k forks source link

Typo in Windows10SysPrepDebloater.ps1 #207

Open theextendedname opened 4 years ago

theextendedname commented 4 years ago

Line 177 of Windows10SysPrepDebloater.ps1 will cause line 178 to always evaluate to false $CloudStore = 'HKCUSoftware\Microsoft\Windows\CurrentVersion\CloudStore' should be $CloudStore = 'HKCU:Software\Microsoft\Windows\CurrentVersion\CloudStore'

Line 180 of Windows10SysPrepDebloater.ps1 will prompt for user input if there are child nodes Remove-Item $CloudStore May need to be changed to Remove-Item $CloudStore -Recurse

Code as it is now `Write-Output "Removing CloudStore from registry if it exists" $CloudStore = 'HKCUSoftware\Microsoft\Windows\CurrentVersion\CloudStore'

 If (Test-Path $CloudStore) {

 Stop-Process Explorer.exe -Force

 Remove-Item $CloudStore

 Start-Process Explorer.exe -Wait

}

`

should be `Write-Output "Removing CloudStore from registry if it exists" $CloudStore = 'HKCU:Software\Microsoft\Windows\CurrentVersion\CloudStore'

 If (Test-Path $CloudStore) {

 Stop-Process Explorer.exe -Force

 Remove-Item $CloudStore -Recurse

 Start-Process Explorer.exe -Wait

}

`

122800 commented 4 years ago

The addition of the -Recurse option look similar to what this pull request is trying to do.