Folder Icons (Desktop.ini)

twanny

Distinguished
Jun 9, 2005
33
0
18,530
Archived from groups: microsoft.public.windowsxp.general (More info?)

For easy recognition, all folders in my data are assigned an Icon.
The Desktop.ini files in each folder point to a specific Icon Folder
which is never moved, so that the icons are always visible in Explorer View.

What baffles me is that in moving or copying data folders, the icon is not
always visible, even after an F5 refresh. The Desktop.ini file are copied, but
the icons are still not visible. This requires the laborious right-clicking
each folder Properties, change Icon etc. Then and only then the icons are
visible again.

(N.B. this usually happens when copying files either from a CD/DVD or from a
Windows Briefcase, to another folder)
If the path to the icon is correct and the ini file is present, why does
this happen?

--
Twanny
 
Archived from groups: microsoft.public.windowsxp.general (More info?)

Hello?
Any suggestions please?
Thanks

"Twanny" wrote:

> For easy recognition, all folders in my data are assigned an Icon.
> The Desktop.ini files in each folder point to a specific Icon Folder
> which is never moved, so that the icons are always visible in Explorer View.
>
> What baffles me is that in moving or copying data folders, the icon is not
> always visible, even after an F5 refresh. The Desktop.ini file are copied, but
> the icons are still not visible. This requires the laborious right-clicking
> each folder Properties, change Icon etc. Then and only then the icons are
> visible again.
>
> (N.B. this usually happens when copying files either from a CD/DVD or from a
> Windows Briefcase, to another folder)
> If the path to the icon is correct and the ini file is present, why does
> this happen?
>
> --
> Twanny
>
 
Hello,

I had a a same "problem". You have to change the folder attributes.

exp.:

After when I copy the desktop.ini into c:\test give a read only attrib to c:\test.

Zsolt
 
I also have the same problem, since quite a while and I cannot find an easy fix.
It's not a big thing, but it's quite annoying.

It seems that there is an internal flag (perhaps in the registry or the directory entry) telling the shell it should lookup for Desktop.ini for the folder icon.

If you customize the icon of a folder, a Desktop.ini file will be created in that folder.
If you create a new folder and copy that Desktop.ini in, it will have no effect.
BUT if you customize the icon of the second folder, then overwrite it's Desktop.ini with the one of the first folder, the second folder will show like the first one.

For some reason, this 'internal flag' is reset on some operations (compression, SVN update, etc.), especially when using applications that are not aware of that flag. All folders then loose their icons.

If anyone finds the trick, thanks for posting it here!
If I find anything, I will let you guys know.
 
I finally found what the 'internal flag' is! (quite simple, actually).

I found the trick by reading that page: http://forums.stardock.com/163152 (although it doesn't fix the problem).

When you customize a folder Icon:
- The folder gets the 'Read-Only' attribute
- Desktop.ini gets 'Hidden' and 'System' attributes

The Desktop.ini attributes have no impact on wheter the folder icon will be displayed.
It's the folder's 'Read-Only' attribute that tells Explorer to read Desktop.ini for icons! :sol:

But watch out! the confusing thing is that changing the 'Read-Only' status in the Folder properties won't change the folder's attibute!

You have to use the following command line (run "CMD"):
[cpp]attrib +R folder[/cpp]

If you need to restore a lot of folder icons at the same time:
[cpp]attrib /S /R +R folder[/cpp]
This will set the 'Read-Only' attribute to all files and folders recursively.

You can then use the shell Properties to remove the 'Read-Only' attribute from all files and folders (without altering the folders' actual 'DOS' 'Read-Only' attribute!)

Hope this helps.

 
Thx for the tip

I just added a "Set folder read-only" context menu item on shell folders to avoid typing the attrib command.
Here, the registry entry I used :

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\SetReadOnly]
@="Set folder read-only"

[HKEY_CLASSES_ROOT\Folder\shell\SetReadOnly\Command]
@="cmd /c attrib +r \"%1\""
(copy-paste the code in a .REG file and merge)