
HKEY_CLASSES_ROOTĪny file that contains an icon is acceptable, including. The MyProgram.1 ProgID subkey is then assigned the custom default icon. myp file name extension is first associated with the MyProgram.1 application. The following example shows a detailed view of the registry entries that are required for an application icon assignment. The file name extension is associated with an application, but the icon assignment is to the file name extension itself so that the associated application does not dictate the default icon. The following example shows a detailed view of the registry entries that are required for a file-type icon assignment. Step 3:Ĭall the SHChangeNotify function to notify the Shell to update its icon cache.
For an application assignment, HKEY_CLASSES_ROOT\ ProgIDĪssign the DefaultIcon subkey a default value of type REG_SZ that specifies the fully qualified path for the file that contains the icon. For a file-type assignment, HKEY_CLASSES_ROOT\. If you want to revert the changes, simply open the removable drive with File Explorer, make sure in the View tab "Hidden items" is checked, and simply delete the icon and autorun.inf files.Icons can also be assigned on an application-specific basis.Ĭreate a subkey named DefaultIcon in one of the following two locations: Once you completed the steps, you can disconnect and reconnect the removable drive, and now on File Explorer, you'll see the drive with the new icon and label. Under Attributes, check the Hidden option to make these files invisible inside the drive, so you don't delete them by mistake. Right-click the selection and click Properties.
Select the autorun.inf and the icon right files. On Icon make sure to change icon-name.ico with the name of your icon, and on Label change drive-label with the drive label you want. Otherwise, after renaming the file, you'll end up with, which isn't correct.ĭouble-click the autorun.inf to open the file and copy and paste the following: Quick Tip: If your system isn't displaying extension for files, you need to open the View tab on File Explorer and click the File name extensions option to rename the text file autorun.inf properly.
Name the file autorun.inf and press Enter.
Using File Explorer, open the removable drive.Īt the root of the drive, right-click, select New, and click Text Document. Connect the removable drive you want to set a custom icon. ico file, you'll need to copy the icon and create autorun.inf file on your removable drive using these steps: For the purpose of this guide, I'll be using a USB icon from IconArchive, but you can download different icons from many other websites. You can find tons of icons on the web, many of which are freely available. VPN Deals: Lifetime license for $16, monthly plans at $1 & moreīefore you begin, you'll need the icon file (.ico) you want to use.