Main menu

Originally created as a place for me to store some notes, this blog comments on my daily encounters with technology and aims to share some of this knowledge with fellow systems administrators and technical architects across the 'net. Amazingly, it's become quite popular!

SmartFeed by FeedBurner Subscribe to the site feed.

If you find the information here useful, then please consider linking to this site.

Recent Contributions

Calendar

February 2006
M T W T F S S
« Jan   Mar »
 12345
6789101112
13141516171819
20212223242526
2728  

Archive

Changing drive icons in Windows Explorer

A few weeks back, John Howard blogged about changing the Windows Explorer drive icons for his multimedia cards. I decided to give it a go myself and it is pretty cool, although I still can’t find a memory stick icon that I like, so that’s been left at the default setting.

Drive icons

One point to be aware of (that I missed in John’s post) - the DriveIcons and DriveLabel registry items are subkeys (not values) - the actual registry settings that I used are:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E\DefaultIcon]@="%systemroot%\\system32\\shell32.dll,194"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E\DefaultLabel]@="SmartMedia Card"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\F]@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\F\DefaultIcon]@="%systemroot%\\system32\\shell32.dll,189"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\F\DefaultLabel]@="CompactFlash Card/MicroDrive"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\G]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\G\DefaultIcon]@="%systemroot%\\system32\\shell32.dll,193"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\G\DefaultLabel]@="Secure Digital Card"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\H]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\H\DefaultIcon]@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\H\DefaultLabel]@="Memory Stick"

Icons don’t have to be stored within a dynamic link library (DLL) - one MSFN forum post indicates that .ICO files can be used too.

Finally, my USB Flash Drive also has an icon. Because this could have a different drive letter depending on what other devices are connected, I didn’t use the registry approach. Instead, I saved an autorun.inf file in the root folder of the device, with the following contents:

[autorun]
label=USB Flash Drive (128MB)
icon=shell32.dll,12

Using this method the drive lable and icon change whichever computer I use the device in (provided that shell32.dll is available).

Comments

1

Comment from Dario
Time: Thursday 5 April 2007, 17:08

hi! i read the commentary about “how to change the icon on a usb device” but i have a doubt, maybe its silly, but i really dont find it. Can u tell me where i can find the root folder in my usb pen drive. The problem is that qhen i try to save an autorun.inf in my pen drive, i recieve a message that if i want to overwrite an existing file with the same name, i push yes, the autorun.inf appear in my pen drive, but in a few second just disappear!!! and when i look for the file inside the pendrive its nowhere. Can u help. what i want its only to change the icon of my pendrive. thanks for ur help.

Dario

2

Comment from Mark Wilson
Time: Friday 6 April 2007, 18:57

Hi Dario,
The root folder on your USB device is the one which opens when you double-click on the drive’s icon. No idea why your autorun.inf keeps disappearing though.

Mark

3

Comment from Nathan Conlon
Time: Saturday 14 July 2007, 22:53

Hi Dario,
Are you perhaps making it a hidden file go to tools, folder options, view tab, show hidden files and folders if it shows up then right click on the file and go to properties and then uncheck hidden and there you go

4

Pingback from Changing drive icons in Windows Explorer | Blue Onion Software *
Time: Thursday 21 August 2008, 20:53

[…] drive icons/labels is to edit the registry (in Windows XP at least). There’s a great article at markwilson.it that thoroughly explains how to do […]

Write a comment

Please note the rules for comments and the privacy policy and data protection notice. I'm sorry but, because not everyone sticks to the rules, I've had to implement some spam prevention measures - if you're experiencing difficulties leaving a comment, please let me know.





The following XHTML tags may be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>