Desktop.ini: What is it, what can it be used for and what properties does it support?
No doubt you've come across the mysterious 'desktop.ini' file before - especially if you often have hidden files set to show. But what exactly is this file? How can a seemingly empty folder end up with this file? What does it even do? Well, read on to find the answers to all those questions!
What is desktop.ini?
[ViewState]
FolderType=Documents
Vid={137E7700-3573-11CF-AE69-08002B2E1262}
[.ShellClassInfo]
ConfirmFileOp=1
InfoTip=Contains recovered documents from QPad.
EmptyText=There are currently no recovered documents.
What properties does it support?
[ViewState]
- FolderType - the value of the 'Optimise this folder for' option in the folder properties dialog. For example, 'Documents'. Some possible values that can be used here are:
- Documents
- MyDocuments
- Pictures
- MyPictures
- PhotoAlbum
- Music
- MyMusic
- MusicArtist
- MusicAlbum
- Videos
- MyVideos
- VideoAlbum
- UseLegacyHTT
- CommonDocuments
- Generic
- Vid and Mode - Specifies the view mode of the folder. Some CLSIDs that can be used here are:
CLSID Key View Mode Mode {0057D0E0-3573-11CF-AE69-08002B2E1262} Icons 1 {0E1FA5E0-3573-11CF-AE69-08002B2E1262} List 3 {137E7700-3573-11CF-AE69-08002B2E1262} Details 4 {8BEBB290-52D0-11D0-B7F4-00C04FD706EC} Thumbnail 5 {65F125E5-7BE1-4810-BA9D-D271C8432CE3} Tiles 6 {8EEFA624-D1E9-445B-94B7-74FBCE2EA11A} Filmstrip 7 - Logo - Corresponds to the 'Choose a file to display on this folder icon' options in the folder properties dialog box:
7 - Logo - Corresponds to the 'Choose a file to display on this folder icon' options in the folder properties dialog box:
[.ShellClassInfo]
- ConfirmFileOp - Can be specified on a system folder with a value of 0 to avoid a "You Are Deleting a System Folder" warning when deleting or moving the folder. Here is an example of what that warning can look like:
- NoSharing - Not supported on Windows Vista or later. Set this entry to 1 to prevent the folder from being shared.
- IconFile - Specify a custom icon for the folder. Set this entry to the icon's file name. The .ico file name extension is preferred, but it is also possible to specify .bmp files, or .exe and .dll files that contain icons. If you use a relative path, the icon is available to people who view the folder over the network. You must also set the IconIndex entry.
- IconIndex - Set this entry to specify the index for a custom icon. If the file assigned to IconFile only contains a single icon, set IconIndex to 0.
- InfoTip - The tooltip to display when hovering the mouse over the folder and in the Comments field (can be set to a string or path to a string resource):
- EmptyText - Custom text to display when the folder is empty. Normally, a message such as 'This folder is empty' will display when viewing an empty folder. However, this can be changed by setting this value to something else. Here is an empty folder with a custom empty text set (note that the folder is not technically empty as it obviously has the Desktop.ini file in it, but it is common practice to set Desktop.ini to hidden. When you attempt to view a folder that has no non-hidden items and you don't have the option to show hidden items enabled, it will tell you that the folder is empty and display the empty text):
- LocalizedResourceName - A path to a resource file and id to use for the folder's display name. For example, Windows Live Mail uses this property for it's stationary folder:
- DefaultDropEffect - Specifies the default action when performing a drop operation on this folder. Possible values here that we know of are 1 for copy, 2 for move and 4 for create shortcut.
- CLSID - Class ID for the folder. This can be used to create special and system folders. An example of a folder which you may have on your system that uses this is in C:\Windows\assembly. The file C:\Windows\assembly specifies a custom class which customises this folder. For example, it collates various files from multiple folders into one view and contains custom columns in the details view. It also contains custom context menu items, dialogs and help information.
[LocalizedFileNames]
This section can be used for specifying various properties on the folder, such as its name and author. Some values that can be used here are (replace the content withing [] with whatever you want):
- Prop2=31,[Title]
- Prop3=31,[Subject]
- Prop4=31,[Author]
- Prop5=31,[Tags}
- Prop6=31,[Comments]
More reading
Did this guide help you? Do you have anything to add? Do you know of any other properties and/or sections that can be used in Desktop.ini? Let us know in the comments and we'll add them to this article. Also, if this guide did help you and you use an AdBlocker and you want to support us, consider disabling it for this site - if you do, it will be greatly appreciated!
Comments
Post a Comment