Monday, July 5, 2010

Change a drive icon

To change the icon displayed within explorer for a drive requires changes to the windows registry.

  1. Create (if it does not already exist) the registry key:

    HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Explorer\ DriveIcons\ X\ DefaultIcon

    where 'X' is the drive letter of the drive for which you wish to change the drive icon.

  2. Change the key's default value to hold the fully qualified name of the icon file (e.g. 'c:\myicons\cdrive.ico').

    If the file contains more than one icon then follow it with a comma and the zero-based index of the icon (e.g. 'c:\myicons\mylib.dll,2').

  3. To see the affect restart windows - although, depending on the version of windows simply refreshing the window might be sufficient.

No comments:

Post a Comment