I'm a bit noob in PowerShell. I have to suppress a registry entry to remove the context menu option in explorer.exe "Upload to ShareX"
This value is located in : HKEY_CLASSES_ROOT\*\shell\ShareX
[It's also in directory but it have no effect when i delete the "directory" one]
So i tried to remove this item in PowerShell by using :
1st exemple : (not working)
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
set-location 'hkcr:\*\shell'
+ set-location 'hkcr:*\shell' + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument : (:) [Set-Location], PSArgumentException + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.SetLocationCommand
2nd exemple : (not working)
remove-item -path Microsoft.PowerShell.Core\Registry::HKEY_CLASSES_ROOT\*\shell\ShareX -force -confirm:$false
or
remove-item -path 'Microsoft.PowerShell.Core\Registry::HKEY_CLASSES_ROOT\*\shell\ShareX' -force -confirm:$false
I can't get the * value :) PowerShell commands took it as "The Joker"
Can anyone help me please ?
Remove-Item -Path 'HKCR:\`*\Shell\ShareX' -force -confirm:$false
- note carefully the single quote around the pathname, and the backtick immediately before the wildcard asterisk. - Jeff Zeitlin