Set custom folder icon for a network folder in Windows File Explorer

I access a Windows share and the 'folder icon' section (the bottom one) is missing in its settings. It shows up properly in local folders. I would like to have it with both.

A folder properties window with the icon setting highlighted

A local folder properties window


You'll want to use a desktop.ini file to customize the icon. Usually, that's all your actually doing when you are using that "Change Icon" button above. For full documentation see: How to customize folders with desktop.ini An example desktop.ini file follows:

[DeleteOnCopy]
Owner=MyUser
Personalized=13
PersonalizedName=My Folder
[.ShellClassInfo]
[email protected],-12689
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-237

As an aside, if you want to do this without having to manually create the desktop.ini, you can create a folder locally, apply the desired settings, and steal its desktop.ini. (If you don't see it, copy over the entire folder; it should have a correct name originally.) The youtube video Apply a Icon to a Folder on a Network Drive shows this process but uses folder moves rather than creating a new folder.


The customization method outlined by ssnobody assumes you have the capability to change the folder on the remote machine, and that you want the appearance to be changed for all remote and local users of the folder. If either of these is not true, you might want to use this alternative: create a local shortcut to the remote folder (e.g. right-click drag it to the local desktop and select "create shortcut"), and then use the normal "change icon" button of the properties dialog to change the shortcut's icon.


A work-around is to rename your image file "folder.jpg" and place in the shared folder.

Anyone with access and using any of the "icon" or "tile" views in Explorer will see it.


It has been a long time since I have seen so much bull :)

  1. Right-click --> Properties --> Customize ---> Change icon is not available on SMB shares.

  2. ... ---> Change picture has no effect.

  3. Desktop.ini is NOT processed by windows for SMB shares, because Linux interprets the (folder's) "Read Only" bit differently, and reports it back to Windows incorrectly:

    • In Linux, Read only means Read only !
    • In Windows, Read only (with folders only) means process Desktop.ini !!!
  4. There is supposed to be a registry setting that forces Desktop.ini processing by using the "System" (super-hidden) flag instead of "Read Only" but I have never gotten it to work as expected.

  5. The lack of desktop.ini processing on SMB breaks many other things, not just folder icons: Symbolic links and personalized name spaces also don't function. The bums at Microsoft are just refusing to deal with it, all the way back to Windows NT.

  6. It is of course always possible to create indirect links to access the SMB folders, and give those custom icons instead, but that causes multiple other problems:

    • Short-cut links are evaluated and cached by default in Windows whenyou open the parent folder, causing "massive" delays in explorer if a folder contains shortcuts to slow or sleeping network shares.
    • Shortcuts in windows are absolute, not relative ergo not portable. This creates a lot of maintenance should the target root path change. Windows also has a habit of automatically converting environment vars to absolute links, defeating any attempt at working around this.
    • Their bird-brained "Distributed Link Tracking Client" service screws things up even further.
  7. The best way to implement relative links in Windows is to use VBS script. In native (text) form, the VBS script will not have a custom icon, but you can assign a custom icon to the EXE file if you compile it.

That is a lot of work though, and the script will create "untrusted" warning messages every time you launch it from a network, unless the script is local or you find a way to sign it.

VBS Relative Link example:
============================
'  This is a VB Script, which emulates a RELATIVE file link/shortcut in Win XP
'
'  1) The first  line declares an untyped variable      ==> objshell
'
'  2) The second line instantiates a new object derived from    ==> Shell.Application
'
'  3) The third  line invokes the object's method       ==> ShellExecute
'
'     with the following parametters:   "target path"
'                                       "target's arguments"
'                   "starting directory"
'                   "action verb"
'                                       Initial window mode:  0 = Hidden Window
'                                                             1 = Normal Window
'                                                             2 = Minimized
'                                                             3 = Maximized
'                                                             4 = Most recent size and position, keep active window active
'                                                             5 = Current size and position
'                                                             6 = 
'                                                             7 = Minimized, keep active window active
'                                10 = Default state specified by target application
'
'  4) The last line frees/destroys the shell object
'
'
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute                                 _
  "..\..\..\SomePath_Three_Dirs_UP_etc"              ,_
  ""                                                 ,_
  ""                                                 ,_
  "open"                                             ,_
  1
set objShell = nothing
===============================================================