65.9K
CodeProject is changing. Read more.
Home

Changing Drive Icons in Windows 2000

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.40/5 (4 votes)

May 16, 2003

CPOL
viewsIcon

55291

downloadIcon

756

This article explains how to change the specified Drive Icon using VB 6. This is only tested with Windows 2000.

Sample screenshot

Introduction

This demo project explains how to change specified Drive Icon using VB6 in windows 2000 by manipulating the Registry. The demo project also includes a Module, explaining how to edit the registry using Registry API.

It allows to change the specified drive icon to the given path and also allows to revert back to the default icon of Windows.

For example: If you want to change Drive E icon, you need to create the Registry Value named:

HEKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E\
DefaultIcon\

When you create the above name key, it automatically creates a string named "Default".
Set its value to the path of the icon.

History

  • 15th May, 2003: Initial post