Like most people these days, I tend to swap a lot of removable storage devices between my ever-growing assortment of computing devices. The trouble is, I also have an ever-growing collection of removable storage devices, so it gets difficult keeping track of which device is which when I view them in Windows Explorer. The default images are pretty generic, and even though I try to use meaningful names, most of the drives look the same:
By using a simple and under-used Windows feature, I have been personalizing my drives so that they have meaningful icons in Windows Explorer that will be displayed when I plug them into any of my computing devices:
Here's how this works - you just need to store two files in the root folder of each removable drive, both of which will be discussed in more detail later:
autorun.inf
- which defines the icon to use
icon.ico
- which is the icon/image to use for the drive
Creating the Autorun.inf File
The autorun.inf
file defines the icon that will be used in Windows Explorer, and its syntax very simple:
[autorun]
icon=icon.ico
Paste the above code into Windows Notepad and save it as autorun.inf
in the root folder of your removable drive.
Creating the Icon.ico File
This part is a little trickier because you have to find an image and convert it to an icon. I find all of my images by using http://images.bing.com/ to search for a particular removable drive - see http://tinyurl.com/mztbald for an example. What I am looking for is a specific image for the removable drive that I am using, and if I can't find a specific image then I will look for a generic image that works. The following image illustrates that idea:
Once I have an image, I need to convert it to an Icon file. To do my conversions, I use AveIconifier 2.1 by Andreas Verhoeven, which you can download through the Internet Archive at the following URL:
http://web.archive.org/web/20060613232414/http://mpj.tomaatnet.nl/Aveicon.zip
When you open the application, it will prompt you to drag and drop a PNG file into it.
If you were only able to find a JPG or GIF file, don't worry - you can open the image in Windows Paint and click File -> Save As -> PNG Picture to save it as a PNG image:
Once you drag a PNG image into AveIconifier, you can drag out the ICO file that you will need to rename to Icon.ico and save that the root folder of your removable drive.
Click the following image to see what a completed icon that was created with AveIconifier to show looks like.
Hiding the Autorun.inf and Icon.ico Files
One last thing that I do is optional, which is to hide and protect the autorun.inf
and icon.ico
files. To do so, open a command prompt and change directory to the root of your removable drive, then enter the following commans:
attrib +r +h +s autorun.inf
attrib +r +h +s icon.ico
These two commands will make the files as read-only, hidden, system files, which should normally prevent you from seeing them when you open your drive in Windows Explorer, and it should prevent them from being accidentally deleted.
Viewing the Changes
After you have saved both the autorun.inf
and icon.ico
files to the root of your removable drive, you will need to eject the drive and re-attach it to your system in order to see the effects. But as you can see in my earlier illustration, personalization of the drives makes them much easier to identify.
Note: This blog was originally posted at http://blogs.msdn.com/robert_mcmurray/