I finally found an easy and elegant solution to hiding that annoying OneDrive icon from the side bar of File Explorer in Windows 10:
regedit -> search for «IsPinnedToNameSpaceTree
» (or browse to HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}
, but searching is way faster), and set that to 0.
And since I love using PowerShell for stuff these days, here’s how you do it from the command line:
New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR Set-ItemProperty HKCR:\CLSID\`{018D5C66-4533-4307-9B53-224DE2ED1FE6`} -Name System.IsPinnedToNameSpaceTree -Value 0
The PowerShell command didn’t work for me on a fresh install. I got the following error message:
Set-ItemProperty : Cannot find path ‘HKCR:\CLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}’ because it does not exist.
At line:1 char:1
+ Set-ItemProperty HKCR:\CLSID`{018D5C66-4533-4307-9B53-224DE2ED1FE6`} …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKCR:\CLSID{018…3-224DE2ED1FE6}:String) [Set-ItemProperty], ItemNotFo
undException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetItemPropertyCommand
Awh. I’m sorry that didn’t work. If I have the same issue some time and find a solution I’ll update this post.