Windows File Explorer Hacks

Posted in Windows on Aug 17, 2020

There are a few changes I like to make to the Windows File Explorer, like hiding folders and making other visible in This PC. Here's a collection of "hacks" that I've used to customize File Explorer. Caution: registry edits can cause system instability, use at your own risk.

Add User's Links folder to Quick Access

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{d34a6ca6-62c2-4c34-8a7c-14709c1ad938}]
@="Common Places FS Folder"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{d34a6ca6-62c2-4c34-8a7c-14709c1ad938}]
@="Common Places FS Folder"

Hiding folders in This PC

Windows Registry Editor Version 5.00

; 3D Objects
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag]
"ThisPCPolicy"="Hide"

; Music
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag]
"ThisPCPolicy"="Hide"

; Pictures
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag]
"ThisPCPolicy"="Hide"

; Documents
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag]
"ThisPCPolicy"="Hide"

; Videos
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag]
"ThisPCPolicy"="Hide"

Show Recycle Bin in This PC

Windows Registry Editor Version 5.00

; Add to This PC
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}]

; Show in "Folders" instead of "Devices and Drives"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}]
"DescriptionID"=dword:00000003

Show User Proile Folder in This PC

Windows Registry Editor Version 5.00

; Add to This PC
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]

; Show in "Folders" instead of "Devices and Drives"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]
"DescriptionID"=dword:00000003
"SortOrderIndex"=dword:00000000
"System.IsPinnedToNameSpaceTree"=dword:00000001

Changing registry keys owned by TrustedInstaller:

# Import-RegAsTrustedInstaller.ps1

param(
    [Parameter(Mandatory)][string]$File
)

$action       = New-ScheduledTaskAction -Execute "regedit.exe" -Argument "/s `"$File`""
$cim_instance = Register-ScheduledTask -TaskName (New-Guid) -Action $action

$service = New-Object -ComObject 'Schedule.Service'
$service.Connect();

$user   = 'NT SERVICE\TrustedInstaller'
$folder = $service.GetFolder('')
$task   = $folder.GetTask($cim_instance.TaskName)

$task_running = $task.RunEx($null, 0, 0, $user)

Unregister-ScheduledTask -InputObject $cim_instance -Confirm:$false
Import-RegAsTrustedInstaller.ps1 -File your-file.ps1

Discussion