Explorer Icon and Label

USBDLM

 

Windows Explorer Icon and Label


 

USBDLM can put some values into the Windows registry to make the Windows Explorer use a special icon and label for a drive.

 

But the Explorer's behavior changed with each Windows version and even each XP service pack. Sometimes it works, sometimes is does not. It's not USBDLM's fault.

At drive letters A: and B: XP seems to love its floppy icons and floppy names. Here is a high probability that XP ignores the default icon and label settings.

 

A default label is usually used only if the drive has no volume label. But sometimes it's used even the drive has a volume label. The Windows behavior seems to be unpredictable.

 

 

The configuration is similar to AutoRun. You can configure criterions, the first section with criterions which fit to the storage volume is used.

 

The registry settings are made with the flag "volatile", so Windows removes them on restart, USBDLM recreates them if required.

 

USBDLM deletes them on removal of the drive which they are made for.

 

 

Sample to get a camera icon for drives with volume label CANON_DC:

 

[Explorer]

VolumeLabel1=CANON_DC

DefaultIcon=shell32.dll,139

 

The icon is found in the Windows shell.dll of XP and higher at index 139 (counted from 0).

 

Or using an ICO file on the drive:

 

[Explorer]

FileExists=%drive%\usb.ico

DefaultIcon=%drive%\usb.ico

 

 

Sample to get a label "USB-Drive" for USB drives:

 

[Explorer]

BusType=USB

DefaultLabel=USB-Drive

 

 

You can use variables{linkID=} here.

 

Sample for the device name for USB drives which have no volume label:

 

[Explorer]

VolumeLabel=-

BusType=USB

DefaultLabel=%DevName%

 

 

If you want an empty DefaultLabel then configure DefaultLabel=-

In this case USBDLM writes a space as DefaultLabel because an empty value makes the Explorer show the default name as "Local drive".

Under Vista and Windows 7 with the fonts "Segoe UI" you can configure the Unicode character U+200B (zero width space). Of course the USBDLM.INI must be stored then in Unicode format.

The XP fonts Arial, Verdana etc do not support this character.

 

If you want no DefaultLabel then configure DefaultLabel=--

In this case USBDLM writes an empty string.

 

 

 

Define in DriveLetters Sections

 

Since V4.6 DefaultLabel and DefaultIcon can be defined in the volume's DriveLetters section.

If there is either DefaultLabel or DefaultIcon defined in the volume's DriveLetters section then USBDLM does not look for an Explorer section!

 

Sample:

 

[DriveLetters]

DeviceID=USB\VID_9876&PID_5432

Letter=X

DefaultLabel=%DevName%