How to Customize Folders with Desktop.ini

File system folders are commonly displayed with a standard icon and set of properties, which specify, for example, whether the folder is shared. You can customize the appearance and behavior of an individual folder by creating a Desktop.ini file in that folder to specify different options.

Use a Desktop.ini File

Folders are normally displayed with the standard folder icon. A common apply of the Desktop.ini file is to assign a custom icon or thumbnail image to a folder. Yous can too apply Desktop.ini to create an infotip that displays data almost the folder and controls some aspects of the folder's behavior, such every bit specifying localized names for the folder or items in the folder.

Use the following process to customize a binder's style with Desktop.ini:

  1. Employ PathMakeSystemFolder to brand the folder a organisation folder. This sets the read-only fleck on the binder to indicate that the special behavior reserved for Desktop.ini should be enabled. You can besides make a binder a organisation folder from the control line by using attrib +s FolderName.
  2. Create a Desktop.ini file for the binder. You should marker it as hidden and system to ensure that information technology is hidden from normal users.
  3. Make sure the Desktop.ini file that you create is in the Unicode format. This is necessary to shop the localized strings that can be displayed to users.

Create a Desktop.ini File

The Desktop.ini file is a text file that allows y'all to specify how a file organisation folder is viewed. The [.ShellClassInfo] section, allows you to customize the folder'southward view by assigning values to several entries:

Value Description
ConfirmFileOp Set this entry to 0 to avert a "Yous Are Deleting a System Binder" warning when deleting or moving the folder.
NoSharing Non supported under Windows Vista or subsequently. Set this entry to ane to prevent the binder from existence shared.
IconFile If you want to specify a custom icon for the binder, ready this entry to the icon's file name. The .ico file proper name extension is preferred, simply it is also possible to specify .bmp files, or .exe and .dll files that comprise icons. If you lot use a relative path, the icon is available to people who view the binder over the network. You must also prepare the IconIndex entry.
IconIndex Set this entry to specify the index for a custom icon. If the file assigned to IconFile simply contains a single icon, fix IconIndex to 0.
InfoTip Set this entry to an informational text string. Information technology is displayed as an infotip when the cursor hovers over the binder. If the user clicks the binder, the information text is displayed in the folder's data block, below the standard information.

The following illustrations are of the Music folder with a custom Desktop.ini file. The folder now:

  • Has a custom icon.
  • Does not display a "You Are Deleting a System Folder" warning if the folder is moved or deleted.
  • Cannot be shared.
  • Displays informational text when the cursor hovers over the folder.

The folder options in the following illustrations are set to show hidden files so that Desktop.ini is visible. The folder looks similar this:

screen shot of folder with custom icon

When the cursor hovers over the folder, the infotip is displayed.

screen shot of folder with an infotip

The custom icon replaces the binder icon everywhere the folder name appears.

screen shot of custom icon replacing folder icon

The post-obit desktop.ini file was used to customize the Music folder, equally seen in the preceding illustrations.

              [.ShellClassInfo] ConfirmFileOp=0 NoSharing=i IconFile=Folder.ico IconIndex=0 InfoTip=Some sensible information.