My Downloads and Documents folders became fused

Page 2 of 2 FirstFirst 12

  1. Posts : 958
    Microsoft Windows 10 Home
       #11

    Here's what happened.

    Windows uses desktop.ini files to customize folders. Windows uses these not only to assign custom icons to file system folders, but also language-specific display names (LocalizedResourceName). The file for Documents looks like this:

    Code:
    [.ShellClassInfo]
    LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
    IconResource=%SystemRoot%\system32\imageres.dll,-112
    IconFile=%SystemRoot%\system32\shell32.dll
    IconIndex=-235
    [ViewState]
    Mode=
    Vid=
    FolderType=Documents
    The various language versions have different shell.dll files. So when Explorer queries:
    • @%SystemRoot%\system32\shell32.dll,-21770
      • An English language version returns: Documents
      • A Hungarian(?) language version returns: Dokumentumok


    WHen you re-driect a KnownFolder, Explorer creates the file in the new target.Things can get confusing when more than one folder in the same location has the same LocalizedResourceName. For example, if I create a folder named 3D Redirect under my UserProfile, before re-direction, things appear normal:
    My Downloads and Documents folders became fused-screenshot-982-.png


    If I then re-direct 3D Objects to it (without moving contents so original folder remains), my UserProfile folder now looks like this in Explorer:

    My Downloads and Documents folders became fused-screenshot-983-.png

    and the actual folder names are only revealed outside of the Explorer shell:

    Code:
    PS C:\...\keith>gci 3D*
    
        Directory: C:\Users\keithMode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    d-r---         4/17/2021  11:48 PM                3D Objects
    d-r---         4/17/2021  11:54 PM                3D ReDirect
    And when a folder has a LocalizedResourceName applied, re-naming the folder in Explorer
    My Downloads and Documents folders became fused-screenshot-984-.png

    doesn't rename the file system folder, it only modifies the desktop.ini file, assigning a literal value to LocalizedResourceName:
    My Downloads and Documents folders became fused-screenshot-985-.png
    Code:
    PS C:\...\keith>
    gci 3D*
        Directory: C:\Users\keithMode                 LastWriteTime         Length Name
    ----                 -------------         ------ ----
    d-r---         4/17/2021  11:48 PM                3D Objects
    d-r---         4/18/2021  12:23 AM                3D ReDirect
    
    PS C:\...\keith>sl '.\3D ReDirect\'
    PS C:\...\3D ReDirect>gc desktop.ini
    
    [.ShellClassInfo]
    LocalizedResourceName=3D Objects ReName
    IconResource=%SystemRoot%\system32\imageres.dll,-198

    Windows also tries to "protect" these folders by restoring the desktop.ini file if it's been deleted or modifed. So when you had both Documents & Downloads pointed to the same folder, you had dueling desktop.ini files changing the display name back & forth.




    As for the folders that appear under This PC, there are two KnownFolders that reference the user's Documents, Downloads, Music, Pictures, and Videos folders:

    Code:
    FolderDescriptionID                    Name            InstanceCLSID
                             
    -------------------                    ----            -------------                         
    {0ddd015d-b06c-45d5-8c4c-f59713854639} Local Pictures  {24ad3ad4-a569-4530-98e1-ab02f9417aa8}
    {18989B1D-99B5-455B-841C-AB7C74E4DDFC} My Video        {A0953C92-50DC-43BF-BE83-3742FED03C9C}
    {33E28130-4E1E-4676-835A-98395C3BC3BB} My Pictures     {3ADD1653-EB32-4CB0-BBD7-DFA0ABB5ACCA}
    {35286a68-3c57-41a1-bbb1-0eae73d76c95} Local Videos    {f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}
    {374DE290-123F-4565-9164-39C4925E467B} Downloads       {374DE290-123F-4565-9164-39C4925E467B}
    {4BD8D571-6D19-48D3-BE97-422220080E43} My Music        {1CF1260C-4DD0-4EBB-811F-33C572699FDE}
    {7d83ee9b-2244-4e70-b1f5-5393042af1e4} Local Downloads {088e3905-0323-4b02-9826-5d99428e115f}
    {a0c69a99-21c8-4671-8703-7934162fcf1d} Local Music     {3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}
    {f42ee2d3-909f-4907-8871-4c22fc0bf756} Local Documents {d3162b92-9365-467a-956b-92703aca08af}
    {FDD39AD0-238F-46AF-ADB4-6C85480369C7} Personal        {A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}
    FolderDescriptions are in the registry under:

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions

    and the InstaceCLSIDs are found under:

    HKCR\CLSID

    and all are added to the This PC folder by their Instance CLSID:

    My Downloads and Documents folders became fused-screenshot-986-.png

    But only the "Local..." versions are visible. The others are hidden by the "ThisPCPolicy" value found in the PropertyBag subkey of the FolderDescriptionID.Under the User Shell Folders key, some KnownFolders are referred to by their name and some by their InstanceCLSID.For a newly-creaetd user, only Personal, My..., and {374DE290-123F-4565-9164-39C4925E467B}(Downloads) are defined. It's only when you re-direct the folders that their "twin" "Local..." IDs are created.

    So when you changed the path for Personal, you saw no chnage under This PC, because the visible Documents was using the path defined for {d3162b92-9365-467a-956b-92703aca08af} (Local Documents). Had you explicitly typed shell:Personal in the Explorer Address bar, it would have opened to your edited path.



    But the "trick" I mentioned in my earlier post does appear to still work. While the default behavior of the shortcuts is to use the display name of the target folder, this can be over-ridden by creating entries under:

    HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID

    So, the following .reg file would ensure that the shortcuts always display their default names and icons under This PC, even when re-directed to the same folder:

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID]
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{088e3905-0323-4b02-9826-5d99428e115f}]
    @="Downloads"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{088e3905-0323-4b02-9826-5d99428e115f}\DefaultIcon]
    @="C:\\WINDOWS\\system32\\imageres.dll,-184"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{374DE290-123F-4565-9164-39C4925E467B}]
    @="Downloads"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{374DE290-123F-4565-9164-39C4925E467B}\DefaultIcon]
    @="C:\\WINDOWS\\system32\\imageres.dll,-184"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}]
    @="Documents"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}\DefaultIcon]
    @="C:\\WINDOWS\\system32\\imageres.dll,-112"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{d3162b92-9365-467a-956b-92703aca08af}]
    @="Documents"
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{d3162b92-9365-467a-956b-92703aca08af}\DefaultIcon]
    @="C:\\WINDOWS\\system32\\imageres.dll,-112"

    With that you can redirect the folders to a common folder and they will still appear unique under This PC. After re-directing, you can clear the Read-only attribute on the target folder to ensure it displays with its file system name.
      My Computer


  2. Posts : 118
    10 (1909)
    Thread Starter
       #12

    KeithM said:
    [...]
    And you implied that my "buggy" assertion was wrong. It would be a huge mess even if it worked reasonably, with some many things stored all around eclectically.

    I wonder how much investigation did it require to figure out all this...
      My Computer


  3. Posts : 958
    Microsoft Windows 10 Home
       #13

    avada said:
    And you implied that my "buggy" assertion was wrong.
    And I stand by my assertion! "Byzantine", perhaps, but not "buggy"

    [/QUOTE]

    It would be a huge mess even if it worked reasonably, with some many things stored all around eclectically.
    Not really. Most of the detail I provided is for the sake of explaining how things work and how they went wrong. But your original goal, To have Documents & Downloads appear distinct under This PC but reference the same file system folder, you just need to:


    1. Merge the .reg file to "lock down" the names & icons for the folders under This PC.
    2. Via each folder's Properties dialog, re-direct both to a common folder.
    3. Clear the Read-only attribute on the common target so it displays its actual name. As long as you can live without the file system folder having a custom icon, you don't need the desktop.ini file.


    I would first redirect each folder to a newly-created temporary sibling without moving the file. That would leave your existing files in seperate folders that are no longer designated the official Documents & Downloads, but retaining those names and the custom icons --- clearing their Read-Only attributes and then re-naming might help avoid confustion, as the temp folders will acquire their own desktop.ini files as the new "offical' folders. Then redirect each of those to the common destination. Then you can check to make sure everything is working as desired and only manually move your files to the new folder once you're satisfied.


    I wonder how much investigation did it require to figure out all this...
    LOL. There was no deep-dive research to compose this. The knowledge comes from experience and time. Starting answering questions in the MS Newsgroups dedicated to XP issues. A lot of poking & prodding & playing with Explorer & the Shell. I pretty much know everything I posted by heart. Had I access to your computer when you were having problems, I could have untangled it in minutes. It's just trying to compose and format the explanation that took time!
      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 06:19.
Find Us




Windows 10 Forums