Custom icon front-back for folders containing files


  1. Posts : 22
    Windows 10
       #1

    Custom icon front-back for folders containing files


    Greetings,
    Through editing the registry i replaced the default icon for general folders, it applies with empty folders and non-big-icon views (as suggested in some old guide):

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
    ; Folder
    "3"="%UserProfile%\\System\\Icons\\Folder.ico,0"
    "4"="%UserProfile%\\System\\Icons\\Folder.ico,0"
    ; This Pc (from other folders, not from desktop)
    "15"="%UserProfile%\\System\\Icons\\ThisPc.ico,0"
    ; Change the arrow of all shortcuts
    "29"="%UserProfile%\\System\\Icons\\ShortcutArrow.ico,0"
    ; again folder
    "155"="%UserProfile%\\System\\Icons\\Folder.ico,0"
    "205"="%UserProfile%\\System\\Icons\\Folder.ico,0"



    Then i found out left value numbers coincide with the index of said icon inside imageres.dll, which is the file that holds all default stuff.
    In the past i've directly edited imageres.dll via a resource editing tool, but doing so the default imageres.dll would be recovered with every single windows update or check, and i dont want to replace it manually everytime.
    Since the previous keys seem to override the images from imageres.dll, i looked there for the two images used as back side and front side of the folder icon when it contains files that are previewed, ad added the two relative keys to the registry:


    ; Folder with content
    ;back
    "5"="%UserProfile%\\System\\Icons\\Folder Back.ico,0"
    ;front
    "6"="%UserProfile%\\System\\Icons\\Folder Front.ico,0"

    But unlike the previous ones, this doesn't work; i cant find any duplicate within imageres, 5 and 6 are the only indexes where folder's back and front parts appear.
    Does anyone know any way to override the default? Or did i miss something?

    Note: this solution of redirecting the original index to a path doesn't work with the icons that depend on your theme (this pc, recycle bin), theme's settings override both imageres.dll and registry. I noticed because even editing imageres default "this pc" icon i kept seeing the one from current theme.

    But folder's back-front aren't theme-dependent so… idk

    _______________________________________
    In the image, top to bottom:

    • successfully changed default folder icon
    • example of "non empty" folder composed of 3 parts: back icon, content preview, front icon
    • back icon replacement
    • front icon replacement

    Custom icon front-back for folders containing files-here.png
      My Computer


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

    In the past i've directly edited imageres.dll via a resource editing tool, but doing so the default imageres.dll would be recovered with every single windows update or check, and i dont want to replace it manually every time.
    Just a comment on imageres.dll- I replace icons with Win 7 icons using an old freeware tool which runs and creates a patched copy automatically. I find imageres.dll is replaced only when doing a feature update (and it would be by an in-place repair install too of course) - not by routine updates.
    Get Windows 7/8 Icons In Windows 10 With This Tool

    (Authors site deceased now).

    But certainly the changes to imageres.dll are best redone for each major build.

    Note: the tool won't automatically replace imageres.dll - that has to be done manually).
      My Computers


  3. Posts : 22
    Windows 10
    Thread Starter
       #3

    dalchina said:
    Just a comment on imageres.dll- I replace icons with Win 7 icons using an old freeware tool which runs and creates a patched copy automatically. I find imageres.dll is replaced only when doing a feature update (and it would be by an in-place repair install too of course) - not by routine updates.
    Get Windows 7/8 Icons In Windows 10 With This Tool

    (Authors site deceased now).

    But certainly the changes to imageres.dll are best redone for each major build.

    Note: the tool won't automatically replace imageres.dll - that has to be done manually).
    Thanks, but i already know how to replace imageres resources, i was just wondering if there's a way to override imageres through registry keys the way i did for the default folder icon.
      My Computer


  4. Posts : 989
    Microsoft Windows 10 Home
       #4

    I think the edits to the Shell Icons key aren't working because Windows is never looking for the values 5 and 6. The registry doesn't "force" itself on Windows, there has to be code that queries the registry.

    I created the values 3 and 4 (default folder and open folder). The open folder icon only appeared in regedit.exe not in Explorer. Running Procmon and filtering for "Path contains Shell Icons" shows that only regedit, not explorer, ever queried HKCU\...\Shell Icons\4. Explorer never queried values 5 and 6.
    The complete logfile is here.

    A bit of PowerShell lets us see the unique values queried:

    Code:
    (import-csv logfile.csv).path | select -unique | %{[int]$_.split('\')[-1]} | sort
    Produces:
    023489111415282930345759757677107115172173176179

    (This was after some time spent browsing folders)

    So my guess is that the code that creates the thumbnail folders never queries this key, but simply uses the resources directly when composing the image.

    Keith
      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 17:07.
Find Us




Windows 10 Forums