Explorer and open/save windows columns (folder view) settings, keep?


  1. Posts : 96
    Microsoft Windows 10 Pro for Workstations 64-bit 19044 Multiprocessor Free
       #1

    Explorer and open/save windows columns (folder view) settings, keep?


    For my use, I always need to have my Explorer and open/save window's file/folder columns like this:

    Size, Date modified, Type (and view mode: Details)

    Anything else is very distracting and uninformative. The problem is, these columns settings keep changing no matter what I try. For some reason, sometimes sub folders or any folders suddenly have different columns settings after a while. Also, Explorer and open/save windows might have different views. Explorer / File / (Folder) Options / View / Apply to Folders and Exporer / folder / Properties / Customize / General items, [x] Also apply this template to all subfolders – these should help but they don't. No matter what is done with those, Windows keeps changing the columns settings.

    Is there a way to force the columns settings to stay? Or how to make a shortcut that reloads my preferred columns view?
      My Computer


  2. Posts : 42,957
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, would this be of interest?
    WinSetView v2

    And there are tutorials like this:
    Set Default Folder View for all Folders in Windows 10

    Please note that many Open/Save dialogues look superficially as though they are related to file explorer but may not be. Many are implemented by the particular program in use. Therefore don't expect view settings to necessarily apply to these.
      My Computers


  3. Posts : 989
    Microsoft Windows 10 Home
       #3

    Copy & paste the following code block into a PowerShell console window and press Enter to execute.

    It will create & merge a .reg file that sets a uniform Common Dialog default for all the FolderTypes.

    Should do exactly what you want.

    This sets a per-user default. If you'd like to set it as a machine-wide default, change
    Code:
    ...
    $Template = @'
    [HKEY_CURRENT_USER\...
    to
    Code:
    ...
    $Template = @'
    [HKEY_LOCAL_MACHINE\...
    and run the code from an Admin PowerShell console window.

    Code:
    $NetBags     = 'HKCU:\Software\Microsoft\Windows\Shell\Bags'
    $LocalBags   = 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags'
    $FolderTYpes = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
    
    $NetBags, $LocalBags | ForEach{
        ( Get-ChildItem $_ -Recurse | Where PSChildName -match 'ComDlg' ) | Remove-Item -Recurse
    }
    
    
    $Exclude = @'
    ControlPanel
    FileItemAPIs
    Internet
    OpenSearch
    OtherUsers
    RestrictedNonIndexed
    SearchConnector
    Searches
    SearchHome
    Sync
    '@ -split '\n' -join '|'
    
    $FolderTypeIDs = Get-ChildItem $FolderTYpes | Get-ItemProperty |
         Where CanonicalName -notMatch $Exclude | select -expand PSChildName
    
    $RegHeader = @'
    Windows Registry Editor Version 5.00
    
    
    '@ ### RegHeader
    
    
    $Template = @'
    [HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\ComDlg\FolderTypeID]
    "Mode"=dword:00000004
    "LogicalViewMode"=dword:00000001
    "FFlags"=dword:00000001
    "IconSize"=dword:00000010
    "Sort"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,30,f1,\
      25,b7,ef,47,1a,10,a5,f1,02,60,8c,9e,eb,ac,0a,00,00,00,01,00,00,00
    "ColInfo"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,fd,df,df,fd,10,\
      00,00,00,00,00,00,00,00,00,00,00,04,00,00,00,18,00,00,00,30,f1,25,b7,ef,47,\
      1a,10,a5,f1,02,60,8c,9e,eb,ac,0a,00,00,00,10,01,00,00,30,f1,25,b7,ef,47,1a,\
      10,a5,f1,02,60,8c,9e,eb,ac,0c,00,00,00,50,00,00,00,30,f1,25,b7,ef,47,1a,10,\
      a5,f1,02,60,8c,9e,eb,ac,0e,00,00,00,a5,00,00,00,30,f1,25,b7,ef,47,1a,10,a5,\
      f1,02,60,8c,9e,eb,ac,04,00,00,00,fc,00,00,00
    "GroupView"=dword:00000000
    "GroupByKey:FMTID"="{00000000-0000-0000-0000-000000000000}"
    "GroupByKey:PID"=dword:00000000
    "GroupByDirection"=dword:00000001
    
    
    '@ ### Template
    
    $RegBody = ''
    
    ForEach ( $FolderTypeID in $FolderTypeIDs ) {
        $RegBody += $Template -replace ( 'FolderTypeID' , $FolderTypeID )
    }
    $RegBody += $RegBody -replace ( 'ComDlg' , 'ComDlgLegacy' )
    $RegHeader + $RegBody | Set-Content $env:Temp\CommonDialogs.reg
    
    Reg Import $env:Temp\CommonDialogs.reg
    
    Get-Process explorer | Stop-Process
    Last edited by KeithM; 18 Sep 2021 at 12:54.
      My Computer


  4. Posts : 107
    Windows 10 64 bit Home 22H2 (always completely updated)
       #4

    hi,

    tried the above script both 'per user' and 'machine wide'. It works well: most folder display properly now. Three points of interest:

    -I get an error (?) in pink after 'Stop-process' stating:

    Reg : Executed.
    At line:63 char:1
    + Reg Import $env:Temp\CommonDialogs.reg
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (Executed.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

    -how do I translate my preferred folderview-settings to scriptcode (say I want to add 'Date created' or another column)? Where can I find this 'col-info'?

    -most of my folders have changed columns to the settings as indicated above. But not all: a number of image-folders keep displaying images. How is this possible?

    Thanks in advance, Kan
      My Computer


  5. Posts : 745
    Windows 10/11
       #5

    Kan Lang said:
    hi,
    tried the above script both 'per user' and 'machine wide'. It works well: most folder display properly now. Three points of interest:
    -I get an error (?) in pink after 'Stop-process' stating:
    Hi Kan. Why are you doing this the hard way? You can set up all your default views, including Details for dialogs, using WinSetView. It sets the same registry values (in HKCU) as Keith's scripts, so the end result is the same.
      My Computer


  6. Posts : 107
    Windows 10 64 bit Home 22H2 (always completely updated)
       #6

    hi man, that is a good question now that I have used your app

    it is just great


    thanks a lot for creating and sharing.

    Regards, Kan
      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 07:16.
Find Us




Windows 10 Forums