Changing drive icons of a flash card reader

G

Guest

Hi. I have some time, looking the way of changing the icons of a flash card
reader drives. I have the icons for each card type, even with colors when the
card is inserted and in gray when there is no card. But I can find the way
use this icons instead of the default drive icon of windows.
Thanks for the help.
 
A

Alec S.

Alfredo said:
Hi. I have some time, looking the way of changing the icons of a flash card
reader drives. I have the icons for each card type, even with colors when the
card is inserted and in gray when there is no card. But I can find the way
use this icons instead of the default drive icon of windows.
Thanks for the help.

I'm not certain about Flash cards, but presumably they're no different from other removable drives. How are you doing the other
drive icons? There are at least three native ways of doing it, plus numerous app-specific ways. Let's assume that your Flash
card's drive letter is W.


One way to do it is with the registry, with this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons key. Create a text file somewhere and give it a
..REG extension (eg: driveicons.reg). Place this in it:

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\W\DefaultIcon]
@="W:\myicon.ico"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\W\DefaultLabel]
@="My Flash card"

Of course you will want to change the W in the key to whatever your card's drive letter is, change the icon name/location, and you
can edit or omit the label altogether if you want (if you use it, it is displayed in the comments column of My Computer.)
Double-click it and merge it.


You can also do it with an AUTORUN.INF file located in the root of the drive. Create a text file: W:\autorun.inf (again replace W
with your Flash card's drive letter.) Place this in it:
[Autorun]
icon=myicon.ico
label=My Flash card

Like before, you would edit the icon filename/location, and can edit or omit the label. For this to work however, you will need
Autorun enabled on your system (Autorun, Autoplay's status doesn't matter).


Another option is DESKTOP.INI. It's basically the same as AUTORUN.INF, but slightly different. Create a text file: W:\desktop.ini
and place this in it:

[.ShellClassInfo]
IconFile=myicon.ico
IconIndex=0
Infotip=My Flash card

Again, edit the icon filename, and edit or omit the infotip.


You'll notice that the icon index is separate in desktop.ini whereas in the other two methods it was part of the filename. If
instead of an .ICO file, you were using an icon library (.ICL, .EXE, .DLL, etc.) where multiple icons are located in the file, you
would specify the specific icon by using the index. With desktop.ini, you would set IconIndex to the index of the icon in the file
eg: IconIndex=13, and in the other two methods, you would append it to the filename, eg: W:\myicons.dll,13


One or more of these should do the trick, but if not, you may have to resort to a special handler. For example Microangelo allows
you to specify the icon for pretty much everything in Windows, including-presumably-Flash card icons.


HTH
 
E

Ed Wyche

How do you chnage the icon to a gray icon when there is no card in there?

Alec S. said:
Alfredo said:
Hi. I have some time, looking the way of changing the icons of a flash
card
reader drives. I have the icons for each card type, even with colors when
the
card is inserted and in gray when there is no card. But I can find the
way
use this icons instead of the default drive icon of windows.
Thanks for the help.

I'm not certain about Flash cards, but presumably they're no different
from other removable drives. How are you doing the other
drive icons? There are at least three native ways of doing it, plus
numerous app-specific ways. Let's assume that your Flash
card's drive letter is W.


One way to do it is with the registry, with this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons
key. Create a text file somewhere and give it a
.REG extension (eg: driveicons.reg). Place this in it:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\W\DefaultIcon]
@="W:\myicon.ico"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\W\DefaultLabel]
@="My Flash card"

Of course you will want to change the W in the key to whatever your card's
drive letter is, change the icon name/location, and you
can edit or omit the label altogether if you want (if you use it, it is
displayed in the comments column of My Computer.)
Double-click it and merge it.


You can also do it with an AUTORUN.INF file located in the root of the
drive. Create a text file: W:\autorun.inf (again replace W
with your Flash card's drive letter.) Place this in it:
[Autorun]
icon=myicon.ico
label=My Flash card

Like before, you would edit the icon filename/location, and can edit or
omit the label. For this to work however, you will need
Autorun enabled on your system (Autorun, Autoplay's status doesn't
matter).


Another option is DESKTOP.INI. It's basically the same as AUTORUN.INF,
but slightly different. Create a text file: W:\desktop.ini
and place this in it:

[.ShellClassInfo]
IconFile=myicon.ico
IconIndex=0
Infotip=My Flash card

Again, edit the icon filename, and edit or omit the infotip.


You'll notice that the icon index is separate in desktop.ini whereas in
the other two methods it was part of the filename. If
instead of an .ICO file, you were using an icon library (.ICL, .EXE, .DLL,
etc.) where multiple icons are located in the file, you
would specify the specific icon by using the index. With desktop.ini, you
would set IconIndex to the index of the icon in the file
eg: IconIndex=13, and in the other two methods, you would append it to the
filename, eg: W:\myicons.dll,13


One or more of these should do the trick, but if not, you may have to
resort to a special handler. For example Microangelo allows
you to specify the icon for pretty much everything in Windows,
including-presumably-Flash card icons.


HTH
 
A

Alec S.

Ed Wyche said:
How do you chnage the icon to a gray icon when there is no card in there?

Well I'm not sure whether or not there is an official way since I don't have them, but there is a way to hack it (simulate it).

You can use the DriveIcons registry entry method I described to set the icon for the drive to a gray icon (eg:
c:\icons\flash_empty.ico), and use the autorun.inf method I described to set the icon for it to a colored version of the same icon
(eg: c:\icons\flash_present.ico). That way, when the drive is present, it will load the icon filename from the autorun.inf on the
drive itself, and when it's not, it will use the default specified in the registry. (Of course you would have to put a copy of the
autorun.inf file on each card that you want to do that with.)

There may be one problem however. I don't know if it applies to Flash cards, but with other kinds of removable drives I've seen,
when the drive is not attached, the drive letter does not exist. Therefore, a gray icon would be irrelevant because unlike floppy
or CD/DVD drives which are present in My Computer whether or not a disk/disc is in them, (most) removable drives are removed from My
Computer when not attached and so would not show the gray icon. Again, I'm not sure about Flash card readers, but if as I suspect,
the drive is indeed present in My Computer even if it's empty, then this method would work great.


HTH
 
E

Ed Wyche

If you put a qutorun.inf file on your flash card and format the card in the
device your using (ex: Digital Camera) that file will be deleted.
 
A

Alec S.

Ed Wyche said:
If you put a qutorun.inf file on your flash card and format the card in the
device your using (ex: Digital Camera) that file will be deleted.

Of course, so don't format it. Can't you write to the camera without formatting it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top