Changing Folder Icons in Vista(x64)?

Hi Guys,

I made a toolbar with which you can change folder colors under XP.
Worked like a charm after one of you helped me out, and having now switched to Vista x64 I find that my fancy toolbar doesn't work anymore.

Having checked the desktop.ini file that Vista creates, it seems to now use the 'iconresource' command to set an icon.

However, something else must be going on, as when I echo that myself to a file, it doesn't work. Worse still, even if I copy a desktop.ini file from a Vista changed folder to another one, it doesn't work!
And that is after setting exactly the same attributes on both the folder and the desktop.ini file that Vista does!!!!

Anyone got any ideas?



It might help if you post the toolbar here so we can see what you're doing.

If you're using the Opus Folder Colors system then there's no reason I can think of this wouldn't work under Vista.

If you're using some "undocumented" Windows thing to actually change the colors of the folder icons or similar then it's possible this functionality doesn't exist in Vista any more.


My toolbar basically does the following:

[code]runmode hide

del {filepath$}\desktop.ini /A H

attrib +R {filepath$}
echo [.ShellClassInfo] > {filepath$}\desktop.ini

//echo ConfirmFileOp=0 >> {filepath$}\desktop.ini

echo IconFile=C:\Users\Joris\Documents\Icons\All Colors.icl >> {filepath$}\desktop.ini
echo IconIndex=4 >> {filepath$}\desktop.ini
attrib +H +S {filepath$}\desktop.ini

dopusrt /CMD Go REFRESH[/code]

The iconfile has a load of different colors, so each entry in the menubar has a different index for the various folder colors.

Under vista it seems that the behaviour has changed somewhat, as they're using 'iconresource' as opposed to iconfile and icondex.

What about the Opus Folder Colors system? I don't know anything about that! :slight_smile:



Here you go: [Set File & Folder Colors/Labels via Context Menu)

(I just wrote that up. The information was in a hard-to-find forum post before now. I thought I'd already written a guide for it but I was wrong.)

Looked at the Opus folder coloring functions..very cool, but not quite what I need.

I use it to color folders I use often so I can see them quickly in a fileselector.
And unfortunately the opus folder coloring doesn't work there.

My code does seem to work, but it doesn't immediately update, making it appear as if it doesn't work under vista.

I call a refresh after the code to update the directory, but this doesn't make a difference.
If I quite Opus, restart it and look at the dir, then suddenly the colored Icon is there.

How can I fix this? Is it some sort of cache issue that Vista has?



Opus folder colouring changes the text colour, not the icon colour.

steve, thanks, yes I was aware of that.

What I'm talking about is changing folder icons which don't seem to show correctly in Opus even after a directory refresh.
And I'm trying to find out whether that is an Opus issue or a Vista issue.



Presumably it does change immediately if you change the icon via the proper method, i.e. right-click the folder, Properties -> Customize. That causes the icon to update immediately in Opus here, at least. (Vista 32-bit, and I'd be very surprised if this was something that differed between 64 and 32-bit.)

The button you're using looks rather... unofficial :slight_smile: ...editing desktop.ini directly the way it is.

Note that Opus does not create or control the Properties dialog. So you need to work out what else the Properties dialog is doing which causes the folder icon change to be noticed. It must be doing more than changing Desktop.ini. Maybe it bumps the folder's timestamp as well to trigger it to be refreshed or something like that.

Hi Leo,

Thanks for the reply. Yeah, it is weird as this worked fine under Xp32/64.

The script changes the modified date anyway as I have to change the attribute of the folder (usually set the archive bit) for the icon to be set.

I'm starting to wonder if it is something to do with how Opus refreshes folder views, as the change seems to be instantaneous when I'm viewing it under a regular Explorer window.

I know it is somewhat unofficial and I'd love to know a better way of how to achieve this; it is one of the last things I miss from working with a Mac :stuck_out_tongue_winking_eye:



anyone got any ideas? I still haven't solved this problem...