Ben Ward

Icon prettification for iPods, memory cards, cameras and USB sticks

.

One of the things that I really hate about Windows XP is that it handles external storage like a stone absorbs water.

When you plug in, Windows XP will mount the device with a letter and slap on a generic ‘Removable Disk’ icon. This is fine if you work with only a couple of external devices, but the moment you plug in a ‘6 in 1 Card Reader’ for example, you suddenly have yourself 4 or more ‘Removable Disks’ with the same generic icon. Add to that a USB stick, an iPod and a digital camera and Windows Explorer becomes a confusing and unintuitive mess. In the case of the card readers, you can’t even tell which of the 4 drive letters your card is plugged in to without trial and error.

It's actually possible to have more interesting and specific icons displayed for devices in Windows Explorer

Ordinarily, readers of this blog would expect me to end here with a bit of a whinge. But to break habit, here’s a nice solution instead.

CD or DVD media inserted into a PC can often have its own special icon. This is done using Windows ‘autorun’ mechanism and it transpires that you can use the same method to give your external drives and devices unique icons of their own.

You need two files in the root of the device: One which must be named autorun.inf and the icon file you’d like displayed.

Autorun is quite powerful and usually used to invoke installation programs. Since this is not so complex, the autorun file for icon changing is actually very simple. Here’s the file I use to set the icon of a SecureDigital card:

[autorun]
icon=sdcard.ico

It should be quite clear that sdcard.ico is the name of the icon file in question

With the text saved as autorun.inf and placed with an icon named sdcard.ico in the root of my SD-Card (in my case this is the R:\ device), you should be good to go. Remove the card, wait a few seconds for Windows to remove it from My Computer and then insert it again. After a moment you should hopefully see your new icon appear in My Computer.

If you don’t like having the clutter of these extra files on your SD Card you can hide them without impacting the technique. (Right click the file, choose ‘Properties’ and check the ‘Hidden’ box).

I created the icon by nabbing a generic SD-Card image from Google, applying a transparent background and then creating a number of separate PNG images (square images of 128px, 64px, 48px, 32px and 16px). I then use a neat (and free) app called Icon Sushi to merge them into a single .ico resource.

By adding custom icons to all your removable storage devices, you can make Windows Explorer more intuitive, and prettier to boot.

The same technique applies the same to other storage devices like iPods. Place autorun.inf and device.ico in the root, reconnect it and all being well you should have a pretty new icon.
Basically, if it behaves like an external hard disk, you should be able to do it�

�Although that’s not always true. For example, I tried to set up an icon for my Nikon Coolpix 2200 camera (running in ‘Mass Storage’ mode), but the device is set as read-only, so it’s impossible to create the necessary files.

If you have administrator rights on your system you can also set a friendlier label for the disk drive just by renaming it. For unknown reasons, you can’t change the label of a removable drive in Windows without Administrator rights. Even one that you just plugged in. Probably best responded to with a roll of the eyes, that.

Also if you’re a computer administrator, you can use ‘Disk Management’ to change the drive letters of your external devices. For example, you can assign your iPod to be drive ‘I:’. Look under Start → All Programs → Administrative Tools → Computer Management for that.

What I haven’t found (but would love to have) is a way to hide drives which are unmounted. That’s a shame, because my 6-in-1 card reader has ‘drives’ just sitting there that I’ll probably never use and don’t care to see. It’s another piece of Apple-ish elegance we can only hope Microsoft ‘borrow’ in Windows Vista.

I hope that someone out there finds it useful. Hopefully before everyone gives up and just buys a Mac.

Comments

Previously, I hosted responses and commentary from readers directly on this site, but have decided not to any more. All previous comments and pingbacks are included here, but to post further responses, please refer me to a post on your own blog or other network. See instructions and recommendations of ways to do this.

  1. Very useful, although I’m not entirely sure what icon I could use for my removable disk. Or whether I need it when I only have the one removable media. Or whether there’d be any point at the moment anyway considering the massed-upgrade-without-reinstall seems to have killed my USB hard disk – should probably fix that at some point!

    As for the unused drives – can you not just “Manage” the computer, go to Disk Management and then unassign the drive letter? or is that HDD partitions only. I’m sure I’ve seen a way to hide drives :

  2. Ben

    You can use �Manage� in TweakUI to hide unused drives, that is true. However, that would mean I’d have to unset their hidden status in the event that I was handed a CompactFlash card to read.

    Further, Windows has a dreadful habit of altering drive letters for devices you add and remove in different combinations, so you might hide something one day and have it reappear under a different letter another time. Worse, you could plug in a different device and have it assigned a letter than was assigned to something else that you hid. �and breathe.

    This is why Windows needs to dump drive letters. I can tolerate them for static partitions since they don’t change. When they do the alphabet dance on my iPod though, I get tetchy.

  3. Yeah, I know what you mean with the “Doing the Drive Letter Shuffle” – Linux style drive mounting with a common root does have it’s advantages there :) If you Manage from My Computer in XP (might just be XP Pro) then I found CD drives are listed too, and once you assign a drive it seems to stick with that letter. I’ve not played around with it much, but it could be possible that you can manage them and fix the drive letters for each drive.

    Then again Windows could be completely awkward and not do it that way and forget as soon as you removed your iPod! Whatever happens it won’t do the auto-hide-auto-show of the card readers because the ‘drive’ is there, even if the media isn’t :

  4. Ben

    Once you set a drive it will, usually, stick. However, the problem comes if you set a drive (or in the case of a 6-in-1, four drives) and then plug in a new device, there’s no mechanism in place to stop Windows assigning it once of those drive letters. You can’t �exclusively reserve� them.

    So, with new device stealing the letter of your card reader, you then plug the card reader back in and boom, your beautiful letter assignments are broken.

    You’re dead right, the Unix way is far saner, combine with that the way in which MacOSX wraps it all up (only displaying mounted media on the desktop) is positively gorgeous.

  5. Is works quit good, but my icons are not so nice. Is it possible to send me a copy of these icons-files. Yours are much better.
    Thanks in advance.

  6. Ben

    Yeah sure. Some of them aren’t mine to redistribute, so I highly recommend you take a look at Sascha H�hne’s site, where you can find the Minium and SnowE sets which are magnificent.

    If you’d like a copy of the Secure Digital icon I can send that through to you – just use one of the addresses on my home page. That icon currently suffers from really bad aliasing though, so it’ll only look good on white backgrounds (which of course standard Windows setups use so it’s probably not a problem).

    I vow to polish them up and release them at some point, but shan’t promise as to when.

  7. Hello,

    Could you just give us more details about the following step:

    “applying a transparent background”

    Maybe you can give us an example with “The Gimp” ? That’s would be great !

    I want to make a “TomTom One” icon and I’m blocked at this point…

    Thanks a lot.
    MakGreg.

  8. Ben

    Hi Mark,

    Ooooh, it’s a while since I’ve used Gimp, having nabbed Macromedia’s Fireworks on Education license last year.

    I don’t know if I’ll have time to find you specific instructions, but my quick+dirty technique tends to go like this:

    1. Find a good photograph of the product you’re making an icon of. I like to use shots taken at an angle for larger icons, but a more direct, 2D front-shot works better for the smallest (16×16) sized icon. Pick product photos with a plain white background.
    2. Using some sort of selection tool (either a “Magic Wand”, “Select by Colour” or perhaps “Select Similar”), select the background and hit “Delete” – everything that was selected should now be transparent. Try to select any shadow as well, and remove that too.
    3. Use the eraser tool to smooth the very edges of the remaining bitmap.
    4. If the original photo had shadow, use your shadow effect of choice and recreated it (this will respect the transparency you’ve created and so create a semi-transparent shadow regardless of your Windows background colour)

    At this point, I tend to save individual PNGs of the icon at 16×16, 24×24, 36×36, 48×48 and sometimes 128×128px (just ’cause you can, really). Then I use Icon Sushi to combine the separated PNGs into a single .ico file, transparency intact.

    I believe Gimp has a function to create combined .ico files naively though: Something along the lines of created each icon size as a separate layer and selecting ICO from “Export…” if I remember correctly.

    Hope that helps a bit, anyway.

  9. Has anyone been able to find a workaround with that Windows-letter-shuffle?

    Is there perhaps a way to assign an enviroment variable that would statically assign certain letters for certain physical devices?

    I’ve been having troubles with a virtual CD-drive, that keeps changing it’s letter to F: no matter what I tell it to do. Virtual drive seems to be faster in line to get it’s drive letter than my hard-drives and it completely messes up my neatly organized drive letters.

    Only thing working is to completely disabling the virtual drive, and that quite isn’t a working solution :)

You can file issues or provide corrections: View Source on Github. Contributor credits.