Change icon for USB storage disk

Hi all,
I would like to change icon for USB storage disk.
I use USB’s hardware ID to modify registry, it works fine.

The followings show the registry I have modified:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_03f0&Pid_3207\IQV309IDZ8QVNQFJ\Device Parameters
Icons [REG_MULTI_SZ] = %SystemRoot%\system32\icon.ico

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PerHwIdStorage\USB#Vid_03f0&Pid_3207
Icons [REG_MULTI_SZ] = %SystemRoot%\system32\icon.ico

See above, I modify “Enum” and “PerHwIdStorage” registry key separately, they work fine both. In other words, the disk icon in “My computer” has changed.

However, since my USB device has 2 LUMs, that is, if I plug in the device, there will be 2 disks in “My computer”. If I change above registry key, the 2 disks will have the same icon.
My purpose is to specify different icon to each disk in a USB device. I use USBSTOR’s hardware ID to modify following registries:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR\Disk&Ven_HP&Prod_v100w&Rev_4096\IQV309IDZ8QVNQFJ&0\Device Parameters
Icons [REG_MULTI_SZ] = %SystemRoot%\system32\icon.ico

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PerHwIdStorage\USBSTOR#DiskHP______v100w___________4096
Icons [REG_MULTI_SZ] = %SystemRoot%\system32\icon.ico

Where ‘DiskHP______v100w___________4096’ is the storge’s hardware ID.

I also modify above 2 key separately, but they both don’t work.
It seems if I modify registry key associated with USBSTOR, it will be no effect.

Does anyone know how to specify defferrnt icon for 2 disks in a USB storage device?
Any suggestion is highly appreciated!

Thanks!
Best Regard,
Gordon

> Does anyone know how to specify defferrnt icon for 2 disks in a USB storage device?

Write a shell extension.

I’m even surprised that there are small registry tweaks which can do the job for USB\xxx case.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi Maxim,

>Write a shell extension.
Thanks for your response!

I am not familiar with shell extension.
Could you tell more about shell extension? Where could I get the document or sample code about it?
Thanks again!
Gordon

By the way, in addition to change ‘Icons’ , I also need to change ‘label’ and ‘NoMediaIcons’ for each USB disk.
Can shell extension achieve those features? Could you show me the guide to achieve them?

Thanks!
Gordon