Win-Debloat-Tools icon indicating copy to clipboard operation
Win-Debloat-Tools copied to clipboard

PSDrive HKCR Does Not Exist Recommendation

Open 5p3ctra opened this issue 5 months ago • 1 comments

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?

  1. Start Win Debloat Tools as admin using readme instructions.
  2. 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

5p3ctra avatar Jan 05 '24 14:01 5p3ctra

Having same issue

nopeless avatar Mar 13 '24 06:03 nopeless