JSI Tip 3210. How do I assign a custom icon to a folder in Windows 2000 Explorer?


You can customize the appearance and behavior of a folder by using a Desktop.ini file and/or by using a folder.htt file. This tip will discuss the use of the Desktop.ini file.

NOTE: The information in this tip applies to both Classic and Web style displays.

You can use a Desktop.ini file to:

- Display a custom icon.

- Create an InfoTip to display information about the folder.

- Prevent the folder from being shared.

- Suppress the warning about deleting or moving a system folder.

Click here to see a sample My Computer, detail views of a Desktop.ini customized folder:  

To create and use a Desktop.ini file:

1. Make the folder a System folder, Attrib +s <Drive:>\FolderName.

2. Create a Desktop.ini file, using the following format:

\[ExtShellFolderViews\] Default=\{5984FFE0-28D4-11CF-AE66-08002B2E1262\} \{5984FFE0-28D4-11CF-AE66-08002B2E1262\}=\{5984FFE0-28D4-11CF-AE66-08002B2E1262\}  \[\{5984FFE0-28D4-11CF-AE66-08002B2E1262\}\] PersistMoniker=file://Folder.htt  \[.ShellClassInfo\] ConfirmFileOp=0 NoSharing=1 IconFile=Folder.ico IconIndex=0 InfoTip=Some informational text.
Default=\{5984FFE0-28D4-11CF-AE66-08002B2E1262\} \{5984FFE0-28D4-11CF-AE66-08002B2E1262\}=\{5984FFE0-28D4-11CF-AE66-08002B2E1262\}  \[\{5984FFE0-28D4-11CF-AE66-08002B2E1262\}\] PersistMoniker=file://Folder.htt
is only required if you are going to use a folder.htt file, but I always include this information, exactly as it appears.

ConfirmFileOp=0 avoids the You Are Deleting a System Folder warning. To preserve the warning, use ConfirmFileOp=1.

NoSharing=1 prevents the folder from being shared.

IconFile=Relative path to the icon file. In the above sample, I used IconFile=Earth.ico and placed the icon in the root of the folder. The relative path allows persons who view the folder over the network to also see the icon. While .ico is preferred, you can use .bmp, .exe, and .dll files.

IconIndex=n sets the icon index where multiple icons exist in the IconFile. If only a single icon exists, use IconIndex=0.

InfoTip=Informational Text sets the tip. In the above sample, I used InfoTip=Generate the JSI Desktop Tips.

NOTE: I would set the hidden attribute and protect the Desktop.ini file with NTFS permissions.


Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.