Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have windows 7 and I have a little problem when change folders icon. I have an external hard disk and I have lots of icons on it. I want to change their icons.
this is content of my desktop.ini:

[.ShellClassInfo]
IconResource=\Picture\icons\ico183.ico

and this is attributes of my desktop.ini:

   SH        I:\Music\desktop.ini

I have mention all these icons were showing correctly but one day, they stop working:-(

*Note: * Icons are in external HDD itself, so I can not use system icons. And because i have to move the HDD, I can not use system or any other icons on other systems.


I deleted icon cache and didn't help.
In Orgenize=>Folders and Search options => view => Always show icon...., I used both values (checked and unchecked) and didn't work.

share|improve this question
    
Just some possible clues: back in XP, some of these icon changes via the ini would fail to work anymore when "autoplay" stuff is turned off. In 7 one type of registry icon refreshing was fixed by identifying the "icon location in the file" music.ico,0 (not sure if that is right) . Then there is the secondary desktop.ini showing up on 7 systems (not sure what that is about yet). The icon cache. 1 other weird bug like thing. Does it happen when you "clean" thumbnails, or other cleaner items ? Change Themes? Use a Themes package, that changes more than the themes? –  Psycogeek Feb 20 '12 at 8:11
    
@Psycogeek thanks, All icons were showing correctly and I gave my external HDD to my friend and it happened. So I didn't change anything, or haven't used any theme package and I did not clean thumbnails. –  undone Feb 20 '12 at 8:20
    
please add that additional info to the question. Try changing a few of the inis to reflect the icon location. this is one of mine IconResource=C:\Desk\Icon\Database\LCDPRES.ICO,0 As you can see I keep my own icon folder, so they don't get messed with. Then (assuming you can see system file) check for a second one on the disk. Then clear the iconcache. answers.microsoft.com/en-us/windows/forum/windows_7-desktop/… <-- full version of that. Reboot. if that dont work, Then use Ccleaner, and do a cleanup –  Psycogeek Feb 20 '12 at 8:28
    
@Psycogeek I've done that before and didn't work. As you can see, it's external HDD, so I have to use relative path and I can not use Icon's on my own system. and what type of info I should add? –  undone Feb 20 '12 at 8:40
    
I just noticed that the whole path is not defined in your ini, that could be smart, so they are on the drive itself you handed out? and as the disk name changes they still work on their system? Add the ----> ,0 <--- that tells the system which icon, in that file. If you Reset any one of them, using the system itself, does the system refresh that item proper? and does it hold past a re-boot? –  Psycogeek Feb 20 '12 at 8:41
show 12 more comments

4 Answers

To be clear, the folders / files and their respective icons are stored on the external drive itself.

I have struggled with this myself in the past. There isn't really a way to do what you are asking - at least not in Windows - because each time you reattach the drive, the icons' locations get remapped. Even though the drive letter & order looks the same, something gets wiped / rewritten in the mappings for the drive.

share|improve this answer
    
my problem is no icon is shown only default folder icon. so there should be something wrong with desktop.ini. any suggestion? –  undone Mar 1 '12 at 19:36
    
@Death, yes, I completely understand. It is a "problem" but what I'm saying is that that's how Windows works (or not!). Nothing can be done, as far as I know from my own experience with it. –  Joshua Mar 1 '12 at 21:28
    
It was ok and every thing was fine, so there is nothing wrong with windows –  undone Mar 1 '12 at 22:38
add comment

As requested, reposting as answer to claim the bounty. I guess the problem is related to the one described in this question.

I assume that using relative paths as described in the question above has solved the issue at hand.

share|improve this answer
add comment
up vote 1 down vote accepted

I Solved my problem by using Bhat's answer. here is the answer: If you want to set an icon for a folder on flash drive or external hard drive,you have to use relative path. this is example of the content of desktop.ini:

[.ShellClassInfo]
IconResource=\Picture\icons\ico183.ico,0

desktop.ini file should be system and hidden file and SHOULD NOT be archive. you do this with cmd:

attrib desktop.ini +s +r -a 

and at last, the folder itself should be read-only:

attrib folder +r 
share|improve this answer
add comment

To make it simple we can do it on multiples folders from some location.

Example, if you have lots of folders in a location (C:\Users\YOU\Videos) with files desktop.ini inside, just open a prompt (cmd) and go to that location (C:\Users\YOU\Videos), and then run the following MS-DOS comands:

REM Go to the location of all yours sub-folders
CD "C:\Users\YOU\Videos"

REM Seek and change attributes of *desktop.ini* inside all sub-folders
FOR /f %a IN ('DIR /A/D/B') DO ATTRIB +S +R -A +H "%a\desktop.ini"

REM Modify the attributes of all folders in your location
FOR /f %a IN ('DIR /A/D/B') DO ATTRIB +R "%a"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.