How to enforce "Details" view in Windows File Select Dialog?

Page 2 of 4 FirstFirst 1234 LastLast

  1. Posts : 958
    Microsoft Windows 10 Home
       #11

    I see my name being taken in vain . So I thought I'd chime in.

    First of all, I have to review the lined script to see what methods I employed there. But I'll cover some fundamentals that relate to folder views in general and this question in particular.

    One thing I will say up front is that the common dialgs can be somewhat more confusing because of a crucial distinction between Explorer views & common Dialog views despite their both arising from the same code. On the initial viewing of a given location, both use the defalut TopVIew for the FolderType or, if the view for the FolderType has been customized via Apply to Folders, the customized view is used. But frequently, users have viewed any number of locations (thus saving those views). When Apply to Folders creates a custom template, it also deletes all the saved folder views that use that FolderType (to ensure the template is applied the next time they're opened), it doesn't delete the saved dialog views, they retain their savied view until it's modified by the user. (and of course, I have a PowerShell solution for that )

    But the first thing I would ask the OP is if they have checked to ensure they haven't maxed out on saved views (5000). This PowerShell will return the number of indexed entries:
    Code:
    ((gp "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU").Nodeslots).count
    If you've maxed out, you have no choice but to clear all saved views by deleting the BagMRU (path -> Bag# index) and Bags (view settings) registry keys:

    Code:
    sl 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell'
    'BagMRU', 'Bags' | Remove-Item -Recurse
    Is this the deletion the OP was wary of? I'm going to post this for niow & revew what's already been said/asked more carefullty as well as my own script. Will be back.
      My Computer


  2. Posts : 59
    Windows 10 Pro x64 (Version 21H2, Build 19044.1415)
    Thread Starter
       #12

    @KeithM,
    Thanks for responding. I am aware of the 5000 folder limit and am nowhere near that. This is a clean Windows installation less than 3 months old. In fact, I would just as soon do without Windows remembering individual folder views at all but, as this post complains, the option seems to have disappeared from Windows 10. It mentions the possibility of disabling it by adding this to the registry:
    Code:
    [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\shell]
    "FolderType"="NotSpecified"
    Do you know offhand if that should work, or what side-effects it might have?
    I'd rather have a standard view that I may have to change *temporarily* occasionally than the kind of chaos described here.
    I am not worried about the deletions in your script, which seem to only affect the views (clever script, BTW!). What concerns me is the deletion of all keys under:
    Code:
    [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32]
    [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDOpen]
    [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDSave]
    as proposed by @Brink in the tutorial Try3 referred to.
    When I save files from Firefox, it usually opens the last folder I saved to from the same website, a feature I find useful. However, on further reflection, this is probably a feature of Firefox, not Windows ;-}
      My Computer


  3. Posts : 4,573
    Windows 10 Pro
       #13

    My movie files kind of do the same thing, when I download them they go onto my movies drive as a list, if we set it any other way, we`d be scrolling for hours. That`s fine.

    But when I click on a movie folder I want it to open as a large icon. Sometimes they open with the details view, after I know I`ve changed it once.
    Attached Thumbnails Attached Thumbnails How to  enforce "Details" view in Windows File Select Dialog?-aqp.jpg   How to  enforce "Details" view in Windows File Select Dialog?-cb.jpg  
    Last edited by AddRAM; 17 Mar 2021 at 22:29.
      My Computers


  4. Posts : 958
    Microsoft Windows 10 Home
       #14

    Are you patient & curious to learn how this all works or just want a quick fix? ( Wait! Wait! I know! Both, right? )

    1. The AllFolders key still exists under HKCU\...\Bags and you can pull a number of tricks with it. But that post is old and the FolderType name has changed from NotSpecified to Generic. I like it for other things, but not designating FolderType system-wide -- I find that heavy-handed. In fact, recently, combining that with another trick, I managed to force Generic Details so forcefully that it broke the grouping in Quick Access and category names under This PC. Another drawback to AllFolders is that when it's in play, custom defaults set by Apply to Folders are ignored.

    I've been interrupted. Will post this and edit to finish later....
      My Computer


  5. Posts : 11,387
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #15

    rsbrux said:
    ,,, I don't find anything in those registry keys about views ...
    But the tutorial itself does refer to views - "This tutorial will show you how to reset the view settings of Open and Save As Common Item Dialog boxes back to default"

    Denis
      My Computer


  6. Posts : 958
    Microsoft Windows 10 Home
       #16

    Try3 said:
    But the tutorial itself does refer to views - "This tutorial will show you how to reset the view settings of Open and Save As Common Item Dialog boxes back to default"
    Denis
    The details of Dialog views are saved on aper-folder basis just like their explorer siblings. That's why each bag can have up to three subkeys: ComDlg, ComDlgLegacy, and Shell. The CIDOpen & CIDSave keys don;t hold much data, with a subkey structure and key names: resembleExplorer\CIDOpen\Modules\GlobalSettings\ProperTreeModuleInner
    that resembles ...\Explorer\Modules and its subkeys. And taking a quick peek at the only sustantial binary value reveals it referss to the NavPane as well:


    that

    Code:
    PS HKLM:\>>(gp 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDOpen\Modules\GlobalSettings\ProperTreeModuleInner').ProperTreeModuleInner | Format-Hex
    
    
               Path:
    
               00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
    
    00000000   EB 00 00 00 E7 00 00 00 31 53 50 53 05 D5 CD D5  ë...ç...1SPS.ÕÍÕ
    00000010   9C 2E 1B 10 93 97 08 00 2B 2C F9 AE 4F 00 00 00  œ...“—..+,ù®O...
    00000020   3E 00 00 00 00 4E 00 61 00 76 00 50 00 61 00 6E  >....N.a.v.P.a.n
    00000030   00 65 00 5F 00 49 00 73 00 41 00 70 00 70 00 4C  .e._.I.s.A.p.p.L
    00000040   00 6F 00 63 00 61 00 74 00 69 00 6F 00 6E 00 73  .o.c.a.t.i.o.n.s
    00000050   00 45 00 78 00 70 00 61 00 6E 00 64 00 65 00 64  .E.x.p.a.n.d.e.d
    00000060   00 00 00 0B 00 00 00 FF FF 00 00 3B 00 00 00 2A  ...........;...*
    00000070   00 00 00 00 4E 00 61 00 76 00 50 00 61 00 6E 00  ....N.a.v.P.a.n.
    00000080   65 00 5F 00 43 00 46 00 44 00 5F 00 46 00 69 00  e._.C.F.D._.F.i.
    00000090   72 00 73 00 74 00 52 00 75 00 6E 00 00 00 0B 00  r.s.t.R.u.n.....
    000000A0   00 00 00 00 00 00 41 00 00 00 30 00 00 00 00 4E  ......A...0....N
    000000B0   00 61 00 76 00 50 00 61 00 6E 00 65 00 5F 00 53  .a.v.P.a.n.e._.S
    000000C0   00 68 00 6F 00 77 00 4C 00 69 00 62 00 72 00 61  .h.o.w.L.i.b.r.a
    000000D0   00 72 00 79 00 50 00 61 00 6E 00 65 00 00 00 0B  .r.y.P.a.n.e....
    000000E0   00 00 00 FF FF 00 00 00 00 00 00 00 00 00 00     ...............
    So I don't think this is thte answer for the OP. His issues mostly likely involve default views for various FolderTypes.

    Keith
      My Computer


  7. Posts : 59
    Windows 10 Pro x64 (Version 21H2, Build 19044.1415)
    Thread Starter
       #17

    @KeithM
    Many thanks for the explanation! Now that you have confirmed that dialog and folder views are stored in the same Bags ;-) let me give you my wishlist:
    1. All dialogs and folders show detail view by default; if I need something else, I can change it on the fly. It looks as though your script will do this for me
    2. I can still customize the columns shown for the dialogs and folder types.
    3. I can still assign folder types by using „Also apply this template to all subfolders“ on the „Customize“ tab of the folder properties dialog. I would expect this to be automatic, at least for subfolders of the standard media folders or libraries (Music, Pictures, Videos) but apparently it isn‘t.
    4. Windows *does not* assign any folder types dynamically.
    5. WIndows *does not* remember changes made to individual folders, only to the folder templates.

    This is probably an idle daydream, but as a Bags god, perhaps you can tell me how close I can get to this paradise ;-)
      My Computer


  8. Posts : 958
    Microsoft Windows 10 Home
       #18

    rsbrux said:
    @KeithM
    Many thanks for the explanation! Now that you have confirmed that dialog and folder views are stored in the same Bags ;-) let me give you my wishlist:
    1. All dialogs and folders show detail view by default; if I need something else, I can change it on the fly. It looks as though your script will do this for me
    2. I can still customize the columns shown for the dialogs and folder types.
    3. I can still assign folder types by using „Also apply this template to all subfolders“ on the „Customize“ tab of the folder properties dialog. I would expect this to be automatic, at least for subfolders of the standard media folders or libraries (Music, Pictures, Videos) but apparently it isn‘t.
    4. Windows *does not* assign any folder types dynamically.
    5. WIndows *does not* remember changes made to individual folders, only to the folder templates.

    This is probably an idle daydream, but as a Bags god, perhaps you can tell me how close I can get to this paradise ;-)
    Here I am trying to edit my magnum opus (above ), and you've already replied!


    1. Should be quite doable. My script would probably do the tricki (haven't given it a good look yet), but I think we can be a lot leaner.
    2. Within the confines of the existing types, sure.
    3. "Also apply this template to all subfolders" aka Inheritance. Thereby hangs a tale. You observations are correct, it's a relatively powerless key now, controlling only the FolderType. When it first appeared in XP and was set via the UI, it would control FolderType and icon mode -- the OS created the key with those two values. But one day with RegMon, I saw that if the key existted & had those two values, it was queried by Explorer for the set of view settings: ColumnInfo, Sort, Group -- everything in a normal bag. The functionality had been built in to Explorer but never exposed via the UI. So I wrote a nifty for the time VBS script: FolderViewMaster, and it was quite popular. Alas, that functionality is long gone. The designated folders for a given type under This PC automatically use their correspoinding FolderType, so this can be used to override that behavior, or to defeat content-sniffing. The one nifty thing is that it can be added via a reg edit to the root/virtual Desktop. So if you create an Inherit key with FolderType = Generic to ensure USB drives always display with the Generic template. But it comes with caveats: if you create it before viewing Quick Access or This PC or Network ( or they lose their saved views ) the Genric template will "break" some of their custom features.
    4. Does it really matter what FolderType you're using if they've all cloned the Generic column selection?? ? <j/k>
    5. Maybe....maybe not...


    While I'm sleeping, start by using Apply to Folders to set the "common " Foldertypes: Generic, Documents, Downloads, Generic, Music, Pictures, and Videos. You can verify template creation by looking for the GUID-named values under: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults. Or run this PowerShell to display hte type names.


    Code:
    Function Get-CustomFolderTypes {
        $Defaults = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults'
        $FT       = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
    
    
        If ( ! ( $global:FT_Lookup )) {      # Available for interactive use
            $sbBegin   = {$hash = @{         # for duration of PowerShell session
                '{25CC242B-9A7C-4F51-80E0-7A2928FEBE42}' = 'Network'
                '{D6D9E004-CD87-442B-9D57-5E0AEB4F6F72}' = 'Recycle Bin'
            }}
            $global:FT_Lookup = gci $FT | ForEach $sbBegin {
                 $hash.Add( $_.PSChildName , ($_).GetValue('CanonicalName') )
            } { $hash }
    @"
            FT_Lookup: FolderTYpeID -> FolderType Name created.
            Use:
            `t"`$FT_Lookup.GetEnumerator() | sort value | ft -AutoSize"
            to view in console or type:
            `t"`$FT_Lookkup | Out-GridView"
            to browse, sort, and filter.
    "@ | Write-Host
        }
    
    
        If ( Test-Path $Defaults ) {
            (gi $Defaults).Property | ForEach{ [PSCustomObject]@{
                'ID'  = $_
                'Name'= $FT_Lookup[$_]
            }}
        } Else {
             Write-Host "`n`t`tNo Customized Templates`n"
        }
    }
    Set-Alias -Name gcft -Value Get-CustomFolderTypes
    gcft


    In addition to the "base types", Apply to Folders works for a number of "one-offs" -- types dedicated to a single system folder ( e.g. AccountPictures & shell:AccountPictures ), as well as "mirrors" of the common types used by OneDrive ( FolderTpes beginning with StorageProvider ), so you need to hit those as well.


    Here's the output of gcft after hitting all I'm aware of:


    Code:
    
    ID                                     Name
    --                                     ----
    {B3690E58-E961-423B-B687-386EBFD83239} Pictures
    {885A186E-A440-4ADA-812B-DB871B942259} Downloads
    {94D6DDCC-4A68-4175-A374-BD584A510B78} Music
    {5C4F28B5-F869-4E84-8E60-F11DB97C5CC7} Generic
    {5FA96407-7E77-483C-AC93-691D05850DE8} Videos
    {7D49D726-3C21-4F05-99AA-FDC2C9474656} Documents
    {24CCB8A6-C45A-477D-B940-3382B9225668} HomeFolder
    {DD61BD66-70E8-48DD-9655-65C5E1AAC2D1} StorageProviderDocuments
    {672ECD7E-AF04-4399-875C-0290845B6247} StorageProviderMusic
    {71D642A9-F2B1-42CD-AD92-EB9300C7CC0A} StorageProviderPictures
    {51294DA1-D7B1-485B-9E9A-17CFFE33E187} StorageProviderVideos
    {4F01EBC5-2385-41F2-A28E-2C5C91FB56E0} StorageProviderGeneric
    {D6D9E004-CD87-442B-9D57-5E0AEB4F6F72} Recycle Bin
    {0B0BA2E3-405F-415E-A6EE-CAD625207853} Searches
    {DE2B70EC-9BF7-4A93-BD3D-243F7881D492} Contacts
    {DB2A5D8F-06E6-4007-ABA6-AF877D526EA6} AccountPictures
    {2C7BBEC6-C844-4A0A-91FA-CEF6F59CFDA1} Printers
    HomeFolder = Quick Access

    Once you've created those, you can clear any saved Dialog views that used any of those FolderTypes. This will ensure they use your custom view:

    Code:
    $Defaults = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults'
    $Bags     = 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags'
    
    $CustomIDs = ( Get-Item $Defaults ).Property
    
    ( Get-ChildItem $Bags -Recurse ) |
        Where PSChildName -like ComDlg* |
            Where { $_.GetSubkeyNames()[0] -in $CustomIDs } |
                Remove-Item -Recurse
    Last edited by KeithM; 19 Mar 2021 at 19:26. Reason: Better code
      My Computer


  9. Posts : 17,831
    Windows 10
       #19

    Strange!
    I pick a view>Apply to Folders>Apply this view to all folders of this type>Yes>Done!
    It applies and sticks.
      My Computer


  10. Posts : 59
    Windows 10 Pro x64 (Version 21H2, Build 19044.1415)
    Thread Starter
       #20

    KeithM said:
    4. Does it really matter what FolderType you're using if they've all cloned the Generic column selection?? ? <j/k>
    I guess I wasn't clear enough: I want all folder types to have "Details" as the default view, but I would like to have different column selections. I find it quite useful, for example, to have a "Dimensions" column for Pictures, or a "Length" column for Videos.
    KeithM said:
    While I'm sleeping, start by using Apply to Folders to set the "common " Foldertypes: Generic, Documents, Downloads, Generic, Music, Pictures, and Videos. You can verify template creation by looking for the GUID-named values under: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults. Or run this PowerShell to display hte type names.
    Code:
    $Defaults =  'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults'
    $FldrTYpe = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
    (Get-Item $Defaults).Property | ForEach {
        (Get-Item "$FldrType\$_").GetValue('CanonicalName')
    }
    Will do! Thanks for the instructions, which anticipated my next question about finding the Folder Types in the registry

    - - - Updated - - -

    I have set up folder types Documents, Music, Pictures, Videos and General items as desired and applied to "all folders" as well as "all subfolders". Both your PowerShell script above and a simple
    Code:
    reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults
    (with or without /s) report:
    Code:
    ERROR: The system was unable to find the specified registry key or value.
    even though I can see it in the registry editor, along with the expected 5 GUID-labelled binary values. Paradoxically,
    Code:
    reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /s
    (with or without /s) works just fine.
      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 10:32.
Find Us




Windows 10 Forums