Win-Debloat-Tools
Win-Debloat-Tools copied to clipboard
PSDrive HKCR Does Not Exist Recommendation
Describe the Bug
I was testing this out and ran into an issue when running the Remove OneDrive process.
New-Item: Cannot find drive. A drive with the name 'HKCR' does not exist At C:PATH-TO\src\lib\debloat-helper\Set-ItemPropertyVerified.psm1:24
- New-Item -Path "$Path" -Force | Out-Null
- CategoryInfo : ObjectiveNotFound: (HKCR:String) [New-Item], DriveNotFoundException
- FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.NewItemCommand
Set-ItemProperty : Cannot find drive. A drive with the name 'HKCR' does not exist. At C:\PATH-TO\src\lib\debloat-helper\Set-ItemPropertyVerified.psm1:30
- Set-ItemProperty -Path "$Path" -Name -Value $Valu ...
- CategoryInfo : ObjectNotFound: (HKCR:String) [Set-ItemProperty], DriveNotFoundException
- FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetItemPropertyCommand
How can this issue be reproduced?
- Start Win Debloat Tools as admin using readme instructions.
- Run 'Remove OneDrive'
Expected behavior?
In file /src/scripts/Remove-OneDrive.ps1 Changed line 31 to: New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Scope Global -Name "HKCR" Other scripts outside the folder were able to find the created drive and the error seemed to be fixed. I am not sure if this is an issue other people have when running it? Or an issue from my Windows re-install?
Operating System
Windows 10
Operating System Version
21H2
Logs
N/A
Having same issue