Hi all,

first of all copy a icon file to the root of the drive.
example: c:\icon.ico

then create a file called: autorun.inf in c:\autorun.inf
then open that file and type the following:

[autorun]
icon=icon.ico

save and close the file.

now open my computer and refresh.. and woh! icon changed....
you can apply to other drives too.

be careful:

"autorun.inf" and "ico.ico" must be in the root of the drive.
example: c:\autorun.inf and c:\icon.ico.
same on the root.

ENJOY, this works on 98 too :)

Dani AI

Generated

As demonstrated, the old autorun-based trick has been a simple way to give a drive a custom icon. That technique still explains why a change sometimes appears instantly on older installs. A few practical notes and alternatives reduce surprises on newer systems and when the change does not show up.

Common causes when an icon does not update: Explorer is using a cached image, the icon file lacks the proper ICO sizes (16/32/48/256), antivirus or permissions prevent the file from being read, or recent Windows updates/policies limit autorun behavior for removable media. To force Explorer to reload icons without a full reboot, stop Explorer, remove the OS icon cache, then restart Explorer. Example command sequences (run in an elevated Command Prompt):

taskkill /IM explorer.exe /F
cd /d %userprofile%\AppData\Local
attrib -h IconCache.db
del IconCache.db
start explorer.exe
taskkill /IM explorer.exe /F
cd /d %localappdata%\Microsoft\Windows\Explorer
del iconcache*.* /f /q
start explorer.exe

If autorun-based icons are ignored (common with tightened security for USB/removable media), consider two alternatives. A per-drive registry entry sets a persistent icon for a drive letter (requires admin rights and an icon path that stays available):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\E\DefaultIcon]
@="C:\\Windows\\Icons\\mydrive.ico"

Another option is to use folder-level customization (desktop.ini) for a visible folder rather than the whole drive.

Cautions: back up the registry before edits, run commands as Administrator, and keep the icon file accessible (use multilayer ICO files for best results). Thanks to for the original tip and to for the interest — the above covers common failure modes and safe alternatives for modern Windows.

Recommended Answers

All 2 Replies

Hmmm Nice Thread.

I like it

commented: Welcome to daniweb :) +3

Thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.