The desktop.ini file is a hidden Windows system file. Windows uses it to identify how a folder should be displayed. It is visible when the user globally sets the system to display all the hidden system files and folders i.e. you can see it in Windows file manager only if you check ‘Show hidden files and folders’ in Folder Options by unchecking the check box. The file is peculiarly used to customize and adjust settings for the folders, which contain the file, of Windows OS. It is placed in every folder to instruct the operating system how to display and customize the viewing of that specific folder. It stores information about customized folders and one can customize folder background, change icon or thumbnail image to a folder, and create info tip by creating a Desktop.ini file for that folder.
The common use of the desktop.ini file is to use to it set a custom icon for a folder. After resetting the system settings to hide these files, the desktop.ini files no longer stay visible. Enabling the Hide-protected operating system files (as recommended) setting in Folder Options hides the Desktop.ini files. To access the Folder Options, open Windows Explorer -> Organize -> Folder and Search Options -> View tab.
The Myth of Desktop.ini Virus?
It’s not a virus by default. Normally, desktop.ini is a safe Windows system file. There exist a few known viruses that endanger the capabilities of the desktop.ini file. So it can be infected and since malware can hide itself by wearing a safe file name mask, it is important to find out where the file is located. Remember not to consider it as safe if you suspect something is wrong with your system. You can scan the file with an antivirus tool if you doubt it’s a virus. Rather, hiding such files gives a sleek performance of the operating system. However, the desktop.ini file disappears, even with hidden shown, when you re-hid super hidden files.
Usage of Desktop.ini Files
As mentioned earlier, Desktop.ini is used to assign a custom icon or a thumbnail image to the folders, which are by default displayed with the standard folder icon. It can also be used to construct an info-tip that shows specific information about the folder or items in the folder. File system folders are commonly displayed with a standard icon and set of properties, which specify, for instance, whether the folder is shared. You can customize the appearance and behavior of an individual folder by creating a Desktop.ini file for that folder. Following are the steps to customize a folder’s look using Desktop.ini:
- The prime step is to make the folder a system folder. This can be done in two ways: either from the command line by using attrib+s folder_name or by using Path Make System Folder. This sets the read-only bit on the folder to indicate that the special behavior reserved for Desktop.ini should be enabled.
- Now, create a Desktop.ini file for the folder and mark it as hidden and system to ensure that it is hidden from normal users.
- The created Desktop.ini file is required to be in the Unicode format to store the localized strings that are to be displayed to the users.
Organization of Desktop.ini File
The Desktop.ini file lets you specify how a folder is viewed. The [.ShellClassInfo] section permits the customization of the folder’s view by assigning values to several entries. The desktop.ini file can contain the following most common custom attributes:
ConfirmFileOP
If set to zero, this instruction avoids the warning “You Are Deleting a System Folder” when deleting or moving the folder.
IconFile
Set this entry to specify a custom icon for the folder. You can use either a .ico, .exe or .dll file. The icon is available to people viewing the folder over the network if the relative path is used.
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.
Info-tip
It is a string of text that will be displayed when you hover over the folder. Set this entry to an informational text string. It displays informational text when the cursor hovers over the folder. If the user clicks the folder, the information text is displayed in the folder’s information block, below the standard information.
NoSharing
To prevent the folder from getting shared set this entry to 1. However, this entry is not supported under Windows Vista or later versions.
A typical desktop.ini appears something like this:
[.ShellClassInfo]
ConfirmFileOp=0
IconFile=Folder.ico
IconIndex=0
InfoTip=Type Your InfoTip Here.
Deletion of Desktop.ini File
Desktop.ini file is just a window configuration file/settings that you could edit and do things like changing the picture of the desktop manually. This file can be safely deleted from any directory, thereby, removing any customizations set by the desktop.ini file. As this file consists of the settings associated with the folder that it contains, its deletion will change these settings back to default.
Consider an example. When you create a new folder in Windows it is created with the standard folder icon. If that folder containing this file has been assigned a new icon and if you delete the Desktop.ini file, then the default folder icon will be re-established or re-enabled. However, the trial of deletion of these files can be frustrating as the Windows OS may rebuild them. The deletion of Desktop.ini may fail if it is locked because it is in use by some application. Thus, to delete those files, use a program called ‘Unlocker’.
Conclusion
Now, we are totally aware of what the Desktop.ini file is and whether it’s a virus or not. Additionally, we went through the customization procedure of Windows folders using the Desktop.ini file. So, don’t get scared of such files and rather keep your antivirus programs active to scan out the files if these tend to be malware. Hiding them or not is the user’s decision, but choosing the former option will give a smooth experience of working with Windows folders. Hope all of you readers are clear on the idea, but if not, feel free to ask any questions.
Rajat Panwar
Hi Aish! Thanks for this informative post! I appreciate your hard work Great Job!
Nhick
Thanks for clarifying this.. Now I know exactly what desktop.ini file is..
Rajkumar Jonnala
Hi Aishwarya, thanks for letting us know about Desktop.ini.file and for clearing that it is not a virus. But I would like to know whether it is useful for all the windows?
Aishwarya Gunde
Yes, it does work in all Windows. Just note that there are some different specifications for different versions of Windows, e.g. for icons on Vista you need to use IconResource instead of IconFile. But it may not be useful in every case, e.g. you can use it to change the icon only on an empty folder in Win7 and Vista. So, users may find it useless sometimes.
Juan
It reminds me about when I’m a university student when using Windows XP. It always being use to modified windows XP bar panel with wallpaper, it make windows XP bar area such as “File, Edit, View, Helps …….” more beautiful with wallpaper background
David Hai
Through this article, I understand what is Desktop.ini file. Thank you so much!