2

Windows often decides for itself against the will of the user how a folder should be presented. Despite the various "official" methods to ensure Windows displays folders exactly as the user wishes, I found they often revert. Therefore, I am now attempting the registry route.

I am looking to set the (default) folder view for ALL folders (regardless of type):

  1. Set the view to details (especially for media files/folders i.e., Music, Pictures, and Videos, I still want those to display like any other files/folders, i.e. the columns Name, Date modified, Type, Size)
  2. Set the group by to none (Downloads folder will by default group by date)
  3. Set the sort by to name (again, Downloads will sort by date)
  4. Set the sort by order to ascending (Downloads will sort by newest file, IIRC that's descending)
  5. Disable the automatic folder type deduction, (could potentially break everything I've set)

I've tried following:

  1. This post which disables the Downloads folder group by
  2. This post which tells me which folder IDs to put in the shell bags all folders registry key to set their defaults
  3. This post which tells me how to reset the folder view settings

I've also tried copying registry keys that seem relevant from places that seem to have the settings I want to the relevant folder IDs' registry keys:

registry keys

sort binary key

After all that effort and rebooting multiple times however, I found that the Downloads folder view is still wrong - it still sorts by date descending.

What could be the missing piece from my hack?

Here is a dump of the registry keys I set:

Windows Registry Editor Version 5.00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]
"BagMRU Size"=dword:00002710
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders]
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{0B2BAAEB-0042-4DCA-AA4D-3EE8648D03E5}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{3F2A72A7-99FA-4DDB-A5A8-C604EDF61D6B}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{3F98A740-839C-4AF7-8C36-5BADFB33D5FD}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5F4EAB9A-6833-4F61-899D-31CF46979D49}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5FA96407-7E77-483C-AC93-691D05850DE8}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{631958A6-AD0F-4035-A745-28AC066DC6ED}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{7D49D726-3C21-4F05-99AA-FDC2C9474656}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:80,a1,a0,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,50,a4,9e,d0,6e,02,\
  00,00,e0,53,97,d0,6e,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{885A186E-A440-4ADA-812B-DB871B942259}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:80,a1,a0,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,50,a4,9e,d0,6e,02,\
  00,00,e0,53,97,d0,6e,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{94D6DDCC-4A68-4175-A374-BD584A510B78}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:80,a1,a0,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,50,a4,9e,d0,6e,02,\
  00,00,e0,53,97,d0,6e,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:80,a1,a0,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,50,a4,9e,d0,6e,02,\
  00,00,e0,53,97,d0,6e,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{C4D98F09-6124-4FE0-9942-826416082DA9}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:80,a1,a0,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,50,a4,9e,d0,6e,02,\
  00,00,e0,53,97,d0,6e,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00
 
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{FBB3477E-C9E4-4B3B-A2BA-D3F5D3CD46F9}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:80,a1,a0,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,50,a4,9e,d0,6e,02,\
  00,00,e0,53,97,d0,6e,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags]
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders]
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{0B2BAAEB-0042-4DCA-AA4D-3EE8648D03E5}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{3F2A72A7-99FA-4DDB-A5A8-C604EDF61D6B}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{3F98A740-839C-4AF7-8C36-5BADFB33D5FD}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5F4EAB9A-6833-4F61-899D-31CF46979D49}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{5FA96407-7E77-483C-AC93-691D05850DE8}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{631958A6-AD0F-4035-A745-28AC066DC6ED}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{7D49D726-3C21-4F05-99AA-FDC2C9474656}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{885A186E-A440-4ADA-812B-DB871B942259}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{94D6DDCC-4A68-4175-A374-BD584A510B78}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{B3690E58-E961-423B-B687-386EBFD83239}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{C4D98F09-6124-4FE0-9942-826416082DA9}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Shell\Bags\AllFolders\Shell\{FBB3477E-C9E4-4B3B-A2BA-D3F5D3CD46F9}]
"FFlags"=dword:41200001
"GroupByDirection"=dword:00000000
"GroupView"=dword:00000000
"IconSize"=dword:00000010
"LogicalViewMode"=dword:00000001
"Mode"=dword:00000004
"Sort"=hex:a0,56,97,d0,6e,02,00,00,60,cd,97,d0,6e,02,00,00,30,00,31,00,20,00,\
  28,00,31,00,30,00,39,00,32,00,36,00,31,00,36,00,31,00,39,00,33,00
 

Thank you for your time.

8
  • Show all registry keys and values you have set based on the linked posts. Show everything as text, if possible, instead of screenshots. You can use regedit to export the affected registry keys to a text file.
    – Bodo
    Commented Nov 14, 2022 at 16:28
  • Hello from the author of two of your linked answers. First off, let me say that I haven't upgraded to Win11 yet, so not sure if there is now additional code that may fight with your prefferred defaults. Also, please clarify what mods are currently in effect -- AllFolders entries? Inherit entries? Mods to FolderTypes? Also, is Downloads the only folder still giving you grief? Commented Nov 14, 2022 at 17:42
  • @Bodo I've updated the post with a dump of the registry keys I set Commented Nov 15, 2022 at 5:30
  • @KeithMiller Sorry, I'm not sure what you mean by "mods currently in effect". I've updated the post with a dump of the registry keys I set. As for symptoms I'm seeing, indeed everything is in place except for the Downloads folder. I've fixed it by setting it up manually, but it would be nice to have documentation regarding how to set up an "all details" view, as I'm sure I'm not the only one who prefers to see everything in such view. Commented Nov 15, 2022 at 5:33
  • OKay, on first look at your registry dump, one thing that stands out is the Sort values don't look right to me. At least in Win10, the structure begns with 16 zero-valued bytes (00), a DWORD (4 bytes) specifying the number of PropertyKey structures follow, and then 20 bytes for each PropertyKey structure -- the final four bytes of each of these is always 01 00 00 00 (ascending) or FF FF FF FF (descending). Where did the values you have come from? Commented Nov 15, 2022 at 20:28

2 Answers 2

4

The requirements listed in the question are all handled by the app WinSetView. It's a free, open source, portable app that works by setting/clearing the same registry keys/values as outlined in Keith Miller's answer.

image

2
  • Cool project :) It seems to have done its magic for me, but I'll have to see if it persists reboots (I do those very rarely, only for windows updates) and handles various edge cases. Thanks! Commented Mar 7, 2023 at 4:20
  • You're welcome and thanks for the upvote. The settings will definitely persist through reboots and Windows updates.
    – LesFerch
    Commented Mar 7, 2023 at 8:16
2

First, for the sake of understanding the interplay of various settings, a few comments on the registry keys you have in your export:

  • If you set any machine-wide defaults via HKLM\...\AllFolders, there is no need for duplicate entries under HKCU\...\AllFolders. You would only need them if you wanted to override some aspect of the machine-wide settings.

  • The presence of the "FolderType"="NotSpecified" value under [HKCU|HKLM]\...AllFolders would override content-sniffing to determine the initial view of a folder, so custom defaults for FolderTypes like Music, Pictures, and Video would only be applied when a folder's view is modified via the Customize tab in the Properties dialog.

I personally don't care for trying to force the Generic template on all folders; it seems a bit heavy-handed. Instead, for a similar result, I prefer customizing the defaults for other FolderTypes to replicate the settings of the Generic type.

I also don't like using AllFolders to customize any type that can also be customized via Apply to Folders for several reasons:

  • If a FolderType implements Apply to Folders, an AllFolders seeting for the same type will cause the Apply to Folders settings to be ignored, even if Apply to Folders is set afterward. This can be confusing.

  • Apply to Folders customizations are easily modified via the UI -- not so with AllFolders.

  • Apply to Folders customizations survive the deletion of Bags and BagMRU registry keys.

I think AllFolders entries are best reserved to modify SearchResults defaults, and if desired, setting common dialog defaults that differ from the Explorer defaults for a given type.

So, with all that in mind, take a deep breath, be resigned to a couple of restarts, and begin.

  1. Delete existing saved views and customizations by deleting the following registry keys:

    HKLM\SOFTWARE\Microsoft\Windows\Shell\Bags
    HKCU\SOFTWARE\Microsoft\Windows\Shell\BagMRU
    HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU
    HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags
    
    • Under HKCU\SOFTWARE\Microsoft\Windows\Shell\Bags, delete all subkeys except 1 (holds Desktop layout).

    • Under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams, delete the Defaults subkey along with any numbered subkeys, leaving only the Desktop subkey.

      PowerShell (Admin/Elevated) :

        -split @'
        HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU
        HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags
        HKCU:\SOFTWARE\Microsoft\Windows\Shell\BagMRU
        HKLM:\SOFTWARE\Microsoft\Windows\Shell\Bags
        '@ | Remove-Item -Recurse -Force
      
        Get-ChildItem HKCU:\SOFTWARE\Microsoft\Windows\Shell\Bags | where PSChildName -ne 1 | Remove-Item -Recurse -Force
        Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams | where PSChildName -ne Desktop | Remove-Item -Force  
      
  2. Restart

  3. Set the Generic custom template:
    a. Open Explorer to theThis PC\Desktop folder (or any other folder that defaults to the Generic template).
    b. Make all desired modifications to the view.
    c. View ribbon -> Options -> Change folder and search options -> View tab -> Apply to Folders -> accept confirmations.

  4. Set the OneDriveGeneric custom template:
    a. Open Explorer to theOneDrive folder.
    b. Make all desired modifications to the view.
    c. View ribbon -> Options -> Change folder and search options -> View tab -> Apply to Folders -> accept confirmations.

  5. In regedit, verify that values named:

    • {5C4F28B5-F869-4E84-8E60-F11DB97C5CC7} (Generic)
    • {4F01EBC5-2385-41f2-A28E-2C5C91FB56E0} (OneDriveGeneric)

    have been cfeated under:

    • HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults

Now, we want to create copies of these values that differ only in name. You want to copy the Generic template seven times, renaming the copies:

{db2a5d8f-06e6-4007-aba6-af877d526ea6}
{7d49d726-3c21-4f05-99aa-fdc2c9474656}
{885a186e-a440-4ada-812b-db871b942259}
{94d6ddcc-4a68-4175-a374-bd584a510b78}
{b3690e58-e961-423b-b687-386ebfd83239}
{CD0FC69B-71E2-46e5-9690-5BCD9F57AAB3}
{5fa96407-7e77-483c-ac93-691d05850de8}

You also want to create four copies of the OneeDrive template and name the copies:

{DD61BD66-70E8-48dd-9655-65C5E1AAC2D1}
{672ECD7E-AF04-4399-875C-0290845B6247}
{71D642A9-F2B1-42cd-AD92-EB9300C7CC0A}
{51294DA1-D7B1-485b-9E9A-17CFFE33E187}

If you're doing this manually, you want to export the key with the two template values and then use a text editor to duplicate and rename the desired values in a .reg file, then merge the edited .reg file.

If you're comfortable with PowerShell, use this code:

$Defaults        = 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults'

$Generic         = (gp $Defaults).'{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}'
$OneDriveGeneric = (gp $Defaults).'{4F01EBC5-2385-41f2-A28E-2C5C91FB56E0}'

-split @'
{db2a5d8f-06e6-4007-aba6-af877d526ea6}
{7d49d726-3c21-4f05-99aa-fdc2c9474656}
{885a186e-a440-4ada-812b-db871b942259}
{94d6ddcc-4a68-4175-a374-bd584a510b78}
{b3690e58-e961-423b-b687-386ebfd83239}
{CD0FC69B-71E2-46e5-9690-5BCD9F57AAB3}
{5fa96407-7e77-483c-ac93-691d05850de8}
'@ | ForEach {
    Set-ItemProperty -Path $Defaults -Name $_ -Value $Generic
}

-split @'
{DD61BD66-70E8-48dd-9655-65C5E1AAC2D1}
{672ECD7E-AF04-4399-875C-0290845B6247}
{71D642A9-F2B1-42cd-AD92-EB9300C7CC0A}
{51294DA1-D7B1-485b-9E9A-17CFFE33E187}
'@ | ForEach {
    Set-ItemProperty -Path $Defaults -Name $_ -Value $OneDriveGeneric
}

Regardless of how you copy the values, the end result in the registry should look like this:

enter image description here

  1. Restart the system.

Will address SearchResults and Libraries in an edit.

4
  • Thank you for this. One note though: while the downloads folder view in the explorer is fixed, its view in dialogs (e.g., downloading and/or uploading something and it asks for a location) remain grouped and sorted by date. Is there any way to fix this? Commented Nov 21, 2022 at 12:31
  • The common dialogs should be following the new default -- they are here ( Because updates can change behavior at any time, I implememetned all the mods I suggested on my machine before posting and they're still in effect ). To satisfy my curiosity, please see if the dialog view is different when you navigate to Downloads via a differnt namespace path than the one that displayed the grouped view. So if This PC\Downloads was grouped, try This PC\C:\Users\<UserProfile>\Downloads or shell:UsersFilesFolder\Downloads. Use Notepad's Open dialog to ensure you're using common dialogs. Commented Nov 21, 2022 at 17:05
  • Assuming the above test went well, modifying the view within the dialog (right-click in dialog background to access Sort by and Group by) before dismissing it should be sufficient. If not, open regedit and search under HKCU\...\Bags for subkeys named {885a186e-a440-4ada-812b-db871b942259}. If any of the found keys are subkeys of ComDlg or 'ComDlgLegacy' and contain a GroupView value of 0xffffffff, delete the entire subkey. Sign out, log back in, and test. Commented Nov 21, 2022 at 17:30
  • Sorry, I believe I forgot to restart back then. Having followed your steps again with the mentioned restarts, I now consistently find that the Downloads folder is not affected by this at all - it's still grouping and sorting by date, even in the explorer. As of right now, the steps I tried brought me closer to my goal than yours. Perhaps something has changed in Win11, I'm not sure. Commented Nov 24, 2022 at 2:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .