Windows File Explorer Undesirable View Change Behavior

Page 1 of 2 12 LastLast

  1. Posts : 745
    Windows 10/11
       #1

    Windows File Explorer Undesirable View Change Behavior


    I've reported the following issue via Windows Feedback Hub. I'm repeating it here just to bring a little attention to this annoying behavior in File Explorer...

    Here's the link: https://aka.ms/AAdns5k

    And here's the issue...

    In all versions of Windows, from Vista to Windows 11, virtual folders, such as "This PC" and "Network", are always reverted back to their default view whenever the view for "General Items" is reset using "Apply to folders". This is best explained with an example:

    1. Open "This PC" and change the view to "List" (or any view other than "Tiles").
    2. Close the "This PC" window.
    3. Open any generic folder, such as C:\
    4. Change the view to "Details" (or any view other than "Tiles").
    5. Select View, Options, Change folder and search options, View, and then click "Apply to folders" (and then "Yes" and "OK").
    6. Open "This PC" and you will see that it has reverted back to its default view of "Tiles".

    The reason for this behavior is that virtual folders, such as "This PC", are also of type "General Items". It's an undesirable side-effect and users can't be blamed for concluding that it's a "bug". Virtual folders need to get their own folder types (i.e. unique GUIDs) to fix this issue.
      My Computer


  2. Posts : 989
    Microsoft Windows 10 Home
       #2

    Well, Quick Access has its own FolderType: {24ccb8a6-c45a-477d-b940-3382b9225668}.

    and considering the reaction to giving Downloads its own FolderType, I wouldn't blame MS for being a little gun-shy...
      My Computer


  3. Posts : 745
    Windows 10/11
    Thread Starter
       #3

    KeithM said:
    Well, Quick Access has its own FolderType: {24ccb8a6-c45a-477d-b940-3382b9225668}.
    Yes, the Quick Access example shows the right way to do it.

    KeithM said:
    and considering the reaction to giving Downloads its own FolderType, I wouldn't blame MS for being a little gun-shy...
    LOL. Microsoft made the right decision to give Downloads it's own folder type. They just should have picked more sensible defaults, such as Details and Group by (None). There still would have been a little fallout, but nothing compared to the thousands of people complaining about Group by Date.

    Anyhow, This PC and Network are fairly trivial examples, but here's one that's particularly aggravating....

    Connect a phone via USB (I tested with an Android phone) and choose File transfer mode on the phone. This will mount the phone as a virtual folder with every single subfolder in Tiles view. This virtual folder shares the General Items GUID (just like "This PC" and "Network") which, of course, means that Apply to folders is grayed out. To change the view for all folders on the phone requires setting each folder individually!

    Those painstakingly set folder views will indeed be remembered if the phone is disconnected and reconnected, since those are simply BagMRU/Bags entries.

    But here's the kicker... Just as described in my first post above, using Apply to folders on any General Items folder will cause all of those manually set phone folders to revert to Tiles view. That's the kind of behavior that triggers an ALL CAPS message on answers.microsoft .com.
      My Computer


  4. Posts : 989
    Microsoft Windows 10 Home
       #4

    My first question: Why are you clicking on Apply to Folders so frequently when you know its behavior p*sses you off??

    LesFerch said:
    LOL. Microsoft made the right decision to give Downloads it's own folder type. They just should have picked more sensible defaults, such as Details and Group by (None). There still would have been a little fallout, but nothing compared to the thousands of people complaining about Group by Date.
    Well, I would argue that MS didn't make it clear that it was a new FolderType that could be modified via Apply to Folders, compounded by the fact that the "answer" marked as answer in the MS forums only turned off grouping for he current view, but didn't mention A2F. And I imagine that there are many users that understand the FolderTypes offered under the Customize tab but are unaware there are many more "hidden" FolderTypes. But that's immaterial at this point.



    Connect a phone via USB (I tested with an Android phone) and choose File transfer mode on the phone. This will mount the phone as a virtual folder with every single subfolder in Tiles view. This virtual folder shares the General Items GUID (just like "This PC" and "Network") which, of course, means that Apply to folders is grayed out. To change the view for all folders on the phone requires setting each folder individually!
    I feel your pain, but I would not hold my breath waiting for MS to offer more customization options -- the trend seems to be the opposite.

    I've been poking and prodding view settings since the days of XP. When I was an MVP and attending a summit, I suggested to the Shell Team that they allow users to create their own FolderTypes that could be added to the Customize list. Still waiting, but hope springs eternal!



    So, with all that being said, and within the confines of the current functionality, there are still a few tricks we can use to exert more control.

    When Explorer displays a folder, it first checks for an existing ShellView PropertyBag (HKCU\...\Shell\Bags\<Bag#>). If it exists, the FolderType and view settings found in the bag are used.

    If no PropertyBag exists, Explorer first determines what FolderType to use. It checks the following, listed in order of precednece, i.e. if #1 is found it rules, if #1 doesn't exist, try #2 (lather, rinse, repeat).

    1. Inheritance : Does the PropertyBag of any of the folder's ancestors have the Inherit subkey? If so, the FolderType specified in that key is used. The Inherit subkey is created when you check "Also apply this template to all subfolders." from the Customize tab.
    2. Desktop.ini : Configuration file created when a FolderType is assingned via the Customize tab.
    3. KnownFolder ancestor : Subfolders of KnownFolders, Documents, Music, Pictures, etc., take on the FolderType associated with the KnownFolder.
    4. Content-Sniffing : FolderType is assigned based on the PerceivedType of the files in the folder.


    As you seem to have explored the registry values associated with folder views, you're probalby aware that there are many more FolderTypes than those found in the Customize list.

    Code:
    PS C:\> $FT_Lookup.GetEnumerator() | ? name -like '{*}' | sort value | ft -AutoSize
    
    Name                                   Value
    ----                                   -----
    {db2a5d8f-06e6-4007-aba6-af877d526ea6} AccountPictures
    {91475fe5-586b-4eba-8d75-d17434b8cdf6} Communications
    {503a4e73-1734-441a-8eab-01b3f3861156} Communications.SearchResults
    {80213e82-bcfd-4c4f-8817-bb27601267a9} CompressedFolder
    {de2b70ec-9bf7-4a93-bd3d-243f7881d492} Contacts
    {524ddb2b-2a4f-43b8-b8fe-e91ef9d8ba69} Contacts.Library
    {654a1b99-8a4b-4e7b-a4e1-46378ad77a61} Contacts.LibraryFolder
    {20338b7b-531c-4aad-8011-f5b3db2123ec} Contacts.SearchResults
    {0c3794f3-b545-43aa-a329-c37430c58d2a} ControlPanelAllItems
    {de4f0660-fa10-4b8f-a494-068b20b22307} ControlPanelCategory
    {7d49d726-3c21-4f05-99aa-fdc2c9474656} Documents
    {fbb3477e-c9e4-4b3b-a2ba-d3f5d3cd46f9} Documents.Library
    {3f98a740-839c-4af7-8c36-5badfb33d5fd} Documents.LibraryFolder
    {36011842-dccc-40fe-aa3d-6177ea401788} Documents.SearchResults
    {885a186e-a440-4ada-812b-db871b942259} Downloads
    {B372207C-0011-438F-9151-098B2E36B887} FileItemAPIs
    {5c4f28b5-f869-4e84-8e60-f11db97c5cc7} Generic
    {5f4eab9a-6833-4f61-899d-31cf46979d49} Generic.Library
    {da3f6866-35fe-4229-821a-26553a67fc18} Generic.LibraryFolder
    {7fde1a1e-8b31-49a5-93b8-6be14cfa4943} Generic.SearchResults
    {24ccb8a6-c45a-477d-b940-3382b9225668} HomeFolder
    {549461d3-eb58-4c80-ba29-f1204c4502c3} Internet
    {94d6ddcc-4a68-4175-a374-bd584a510b78} Music
    {3f2a72a7-99fa-4ddb-a5a8-c604edf61d6b} Music.Library
    {978e0ed7-92d6-4cec-9b59-3135b9c49ccf} Music.LibraryFolder
    {71689ac1-cc88-45d0-8a22-2943c3e7dfb3} Music.SearchResults
    {25CC242B-9A7C-4F51-80E0-7A2928FEBE42} Network
    {8faf9629-1980-46ff-8023-9dceab9c3ee3} OpenSearch
    {B337FD00-9DD5-4635-A6D4-DA33FD102B7A} OtherUsers
    {3D1D4EA2-1D8C-418a-BFF8-F18370157B55} OtherUsers.SearchResults
    {b3690e58-e961-423b-b687-386ebfd83239} Pictures
    {0b2baaeb-0042-4dca-aa4d-3ee8648d03e5} Pictures.Library
    {c1f8339f-f312-4c97-b1c6-ecdf5910c5c0} Pictures.LibraryFolder
    {4dcafe13-e6a7-4c28-be02-ca8c2126280d} Pictures.SearchResults
    {2c7bbec6-c844-4a0a-91fa-cef6f59cfda1} Printers
    {d674391b-52d9-4e07-834e-67c98610f39d} Programs
    {7F2F5B96-FF74-41da-AFD8-1C78A5F3AEA2} PublishedItems
    {921C636D-9FC8-40d7-899E-0845DCD03010} PublishedItems.SearchResults
    {D6D9E004-CD87-442B-9D57-5E0AEB4F6F72} Recycle Bin
    {6ef8b050-8a6a-4d79-8344-9dfb5cf391fb} RestrictedNonIndexed
    {982725ee-6f47-479e-b447-812bfa7d2e8f} SearchConnector
    {0b0ba2e3-405f-415e-a6ee-cad625207853} Searches
    {834d8a44-0974-4ed6-866e-f203d80b3810} SearchHome
    {ef87b4cb-f2ce-4785-8658-4ca6c63e38c6} StartMenu
    {DD61BD66-70E8-48dd-9655-65C5E1AAC2D1} StorageProviderDocuments
    {4F01EBC5-2385-41f2-A28E-2C5C91FB56E0} StorageProviderGeneric
    {672ECD7E-AF04-4399-875C-0290845B6247} StorageProviderMusic
    {71D642A9-F2B1-42cd-AD92-EB9300C7CC0A} StorageProviderPictures
    {51294DA1-D7B1-485b-9E9A-17CFFE33E187} StorageProviderVideos
    {6D9969FF-612F-48EF-9B90-853FD82E6EC2} Sync
    {CD0FC69B-71E2-46e5-9690-5BCD9F57AAB3} UserFiles
    {e053a11a-dced-4515-8c4e-d51ba917517b} UserFiles.SearchResults
    {C4D98F09-6124-4fe0-9942-826416082DA9} UsersLibraries
    {59BD6DD1-5CEC-4d7e-9AD2-ECC64154418D} UsersLibraries.SearchResults
    {5fa96407-7e77-483c-ac93-691d05850de8} Videos
    {631958a6-ad0f-4035-a745-28ac066dc6ed} Videos.Library
    {292108be-88ab-4f33-9a26-7748e62e37ad} Videos.LibraryFolder
    {ea25fbd7-3bf7-409e-b97f-3352240903f4} Videos.SearchResults
    And some of these can be customized via A2F. One which can is the AccountPictures type.

    So, if you rarely browse to shell:AccountPicures, you can hijack re-purpose the AccountPictures FolderType. Though it's not available via the Customize tab, it can be assigned to a folder via a desktop.ini file or inheritance ( with the Inherit sbukey being created via a registry edit ).

    Also, be aware that an Inherit subkey can be created via a regedit for folders that don't offer the Customize tab.

    So, as a demo, I opened shell:AccountPicures, set the view to Details, added the Attributes and FolderPath columns, and removed the Tags column (arbitrary mods just to make view recognizable). I then set this as the default for the AccountPictures FolderType using A2F.

    Then I deleted BagMRU and Bags keys and restrted the shell to clear any cached view info, and opened Explorer to This PC and then opened the Desktop folder under This PC.

    Then I launced regedit and added the Inherit subkey to the PropertyBag for This PC with a FolderType of Account Pictures.

    Windows File Explorer Undesirable View Change Behavior-screenshot-1079-.png

    Then, all the folders and drives under This PC used the customized AccountPicutres FolderType.

    So, when a USB key is plugged in, the drive that appears in the Navigation Pane still uses the standard default (because its only ancestor is the virtual Desktop), but the drive that appears under This PC used the custom FolderType.
    Windows File Explorer Undesirable View Change Behavior-screenshot-1080-.png

    As noted earlier, this will over-ride the usual defaults. Note the two differnet views of the F:\ drive and the over-ridden defaults:

    Windows File Explorer Undesirable View Change Behavior-screenshot-1078-.png

    If the folders and drives under This PC have thier own FolderType/Inheritance set, the custom type will only affect USB keys. I can't test with phone -- hope it works for that as well.

    The same principle can be applied to any folder hierarchy.

    I want to do some testing, but I think you could also have several different templates set for the same FolderType defined and swap them in & out (via a coded shortcut) depending on your preference for the folders you're viewing.

    So play with inheritance and obscure FolderTypes. See if the it works with your phone. Post back with results, ideas, questions, etc.
    Last edited by KeithM; 02 Sep 2021 at 16:05.
      My Computer


  5. Posts : 745
    Windows 10/11
    Thread Starter
       #5

    KeithM said:
    My first question: Why are you clicking on Apply to Folders so frequently when you know its behavior p*sses you off??
    LOL again.

    KeithM said:
    Well, I would argue that MS didn't make it clear that it was a new FolderType that could be modified via Apply to Folders, compounded by the fact that the "answer" marked as answer in the MS forums only turned off grouping for the current view, but didn't mention A2F.
    About that... Is there any way that answer can be edited or replaced by a better answer? I'm pretty sure I saw that done for a question recently about Windows 7 and the print nightmare patch. Drives my crazy that the most important step (ie. A2F) is buried in the follow-up replies and users keep coming back with the same nonsense comments.

    Anyhow, regarding the folder views for a connected phone... This is an issue that was brought to my attention by a user of my script. He was disappointed that none of the folder types applied to the connected phone. I investigated and found that it behaved the same as This PC. So, it's an issue that only Microsoft can properly solve by assigning unique GUIDs. I'm intrigued by your GUID repurposing idea, but I would want to somehow leverage that without having to touch BagMRU/Bags keys.

    The only thing I have so far (and this has been added to WinSetView) is an option to have all virtual folders use the General Items view. This, at least, allows the connected phone's folders to open in, for example, Details (if that's what is set for the General Items folder type). This is the code for that option. It's simply an AllFolders\Shell entry that matches the user's view choices for General Items. It was just through experimenting that I found that such an entry affects virtual folders such as This PC and a connected phone.

    Code:
    If ($SetVirtualFolders -eq 1) {
      $GUID = $iniContent['Generic']['GUID']
      $GroupBy = $iniContent['Generic']['GroupBy']
      SetViewValues([Int]$iniContent['Generic']['View'])
      Reg Add "$Bags\AllFolders\Shell\$GUID" /v Mode /d "$Mode" /t REG_DWORD /f
      Reg Add "$Bags\AllFolders\Shell\$GUID" /v LogicalViewMode /d "$LVMode" /t REG_DWORD /f
      If ($LVMode -eq 3) {Reg Add "$Bags\AllFolders\Shell\$GUID" /v IconSize /d "$IconSize" /t REG_DWORD /f}
      If ($GroupBy -eq '') {Reg Add "$Bags\AllFolders\Shell\$GUID" /v GroupView /d 0 /t REG_DWORD /f}
    }
    But, of course, the selected view only applies to virtual folders until the user does an A2F on any General Items folder. Then the view reverts back to Tiles, which is the bit that p*sses me off.
      My Computer


  6. Posts : 745
    Windows 10/11
    Thread Starter
       #6

    It just occurred to me that Quick Access has the same column heading selections as any generic folder, whereas This PC, Network, and a connected phone each have their own unique set of column headings for Details view. I think that may have something to do with why those virtual folders don't have their own folder type.
      My Computer


  7. Posts : 989
    Microsoft Windows 10 Home
       #7

    You say you don't want to touch BagMRU/Bags, but it's deleted Bags that are bothering you. Backing up views you want to preserve prior to executing A2F and then restoring them afterwards would be the way to go. It would be trivial with user awreness & intervention, but almost impossible (I think) to implement at a scripting level in a way that was fully .automated & invisible to an end user
      My Computer


  8. Posts : 745
    Windows 10/11
    Thread Starter
       #8

    KeithM said:
    You say you don't want to touch BagMRU/Bags, but it's deleted Bags that are bothering you. Backing up views you want to preserve prior to executing A2F and then restoring them afterwards would be the way to go. It would be trivial with user awareness & intervention, but almost impossible (I think) to implement at a scripting level in a way that was fully .automated & invisible to an end user
    Yup, but A2F shouldn't be resetting special folders back to default in the first place. It should either leave them alone or set them to match Generic.

    I finally got a chance to test your folder type repurposing steps. It works as described with a USB flash drive or hard drive, but has no effect on a connected phone.

    Is there any possibility of modifying the default view settings for special folders (i.e. virtual folders that have a unique set of column headings). I noticed that This PC has a default view of Tiles and Group by Type, Network is Tiles and Group by Category, and a connected phone is Tiles and Group by (None). I suppose this could all be hard-coded, but that's not typically the Microsoft way. Since the special folders all use the Generic GUID, the defaults are not in the folder types key. I've spent many hours with Procmon (obviously unsuccessfully) trying to find where File Explorer reads those defaults. Maybe my technique is flawed. Have you ever tried to find where File Explorer gets the special folder defaults?
      My Computer


  9. Posts : 989
    Microsoft Windows 10 Home
       #9

    LesFerch said:
    Yup, but A2F shouldn't be resetting special folders back to default in the first place. It should either leave them alone or set them to match Generic.
    Could've, should've, would've...once again, don't hold your breath waiting for MS. Be grateful Explorer hasn't been replaced by some over-simplified phone-friendly app that only shows 4 files per screen with no path or property info!!!
    I finally got a chance to test your folder type repurposing steps. It works as described with a USB flash drive or hard drive, but has no effect on a connected phone.
    Well, rats! Was afraid of that, as I seem to remember someone else reporting something similar But without a phone to observe the behavior, I can't be of much help.

    Is there any possibility of modifying the default view settings for special folders (i.e. virtual folders that have a unique set of column headings). I noticed that This PC has a default view of Tiles and Group by Type, Network is Tiles and Group by Category, and a connected phone is Tiles and Group by (None). I suppose this could all be hard-coded, but that's not typically the Microsoft way. Since the special folders all use the Generic GUID, the defaults are not in the folder types key. I've spent many hours with Procmon (obviously unsuccessfully) trying to find where File Explorer reads those defaults. Maybe my technique is flawed. Have you ever tried to find where File Explorer gets the special folder defaults?
    Some things are definitely hard-coded. Have you noticed that the Recycle Bin has a FolderTypeID --- {D6D9E004-CD87-442B-9D57-5E0AEB4F6F72} --- that appears under HKCU\...\Bags once you've viewed the Recycle Bin and under HKCU\...Streams\Defaults when you execute A2F from the folder? But there is no correspoinding entry under HKLM\...\FolderTypes.

    And though you keep saying Network uses the Generic FolderType, I see it creating the GUID {25CC242B-9A7C-4F51-80E0-7A2928FEBE42}. It doesn't get deleted when A2F is executed from a Genric folder. It is odd that it seems to offer the A2F option, but no value is created under Streams\Defaults. But its defaults can be modifed by creating a corresponding GUID-named entry under [HKLM|HKCU]\...\AffFolders\Shell.

    Windows File Explorer Undesirable View Change Behavior-screenshot-1083-.png
      My Computer


  10. Posts : 745
    Windows 10/11
    Thread Starter
       #10

    KeithM said:
    Some things are definitely hard-coded. Have you noticed that the Recycle Bin has a FolderTypeID --- {D6D9E004-CD87-442B-9D57-5E0AEB4F6F72} --- that appears under HKCU\...\Bags once you've viewed the Recycle Bin and under HKCU\...Streams\Defaults when you execute A2F from the folder? But there is no corresponding entry under HKLM\...\FolderTypes.
    Yes, I did notice that one.

    KeithM said:
    And though you keep saying Network uses the Generic FolderType, I see it creating the GUID {25CC242B-9A7C-4F51-80E0-7A2928FEBE42}. It doesn't get deleted when A2F is executed from a Generic folder. It is odd that it seems to offer the A2F option, but no value is created under Streams\Defaults. But its defaults can be modified by creating a corresponding GUID-named entry under [HKLM|HKCU]\...\AllFolders\Shell.
    Oh, right. I was sure I saw Network revert to it's default view, but it doesn't do that when I test now. It appears to be set up pretty much the same as Recycle Bin, as both can be set via AllFolders\Shell. It's puzzling then why MS didn't set up This PC and the phone view the same way with their own GUIDs. We'll probably never know and, like you said, it will probably never change.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:20.
Find Us




Windows 10 Forums