Removing 'My PC' folders in Windows 8.1

19 Oktober 2013

I normally don't care about what happens in Windows Explorer, because I'm not using it. But after upgrading to Windows 8.1 I notices 6 additional folders in the Computer's view in xplorer2. This is where I want my drives, not links to Music or Videos!

I couldn't find anything in the GUI to turn this off, so I wrote a short PowerShell script to remove them:

function RemoveOneKey([string]$guid,[string]$name,[string]$Wow6432Node)
{
     $fullKey = "hklm:\SOFTWARE\" + $Wow6432Node + "Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{" + $guid + "}" 
     if (Test-Path "$fullKey")
     {
        Remove-Item -Path "$fullKey" 
        Write-Host "$name folder removed"
     }
     else
     {
        Write-Host "$name folder not found"
     }
}

function RemoveOneFolder([string]$guid,[string]$name)
{
    # call once for native, once for 32bit nodes
    RemoveOneKey $guid $name ""
    RemoveOneKey $guid $name "Wow6432Node\"
}

RemoveOneFolder "1CF1260C-4DD0-4ebb-811F-33C572699FDE" "Music"
RemoveOneFolder "374DE290-123F-4565-9164-39C4925E467B" "Downloads"
RemoveOneFolder "3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA" "Pictures"
RemoveOneFolder "A0953C92-50DC-43bf-BE83-3742FED03C9C" "Videos"
RemoveOneFolder "A8CDFF1C-4878-43be-B5FD-F8091C1C60D0" "Documents"
RemoveOneFolder "B4BFCC3A-DB2C-424C-B029-7FE99A87C641" "Desktop

Copy this into a file like 'RemoveMyPCFolders.ps1' and execute in from an elevated PowerShell.

After this you have to log off and on again to get rid of the folders.

Pages in this section

Categories

ASP.Net | Community | Development | IIS | IT Pro | Security | SQL (Server) | Tools | Web | Work on the road | Windows