If you have ever configured the folder settings on your Windows PC and enabled the visibility of hidden files, you might have noticed the desktop.ini file resting on your desktop and in each folder. What is this desktop.ini file in Windows 11/10? Is it a virus? If yes, how can I delete it? If no, what purpose does it serve? This post will explain all your basic questions regarding the desktop.ini file. We will also look at how to customize folders using a desktop.ini file.
What is desktop.ini file
A Desktop.ini file is a hidden Windows operating system configuration settings file located in every folder, that determines how the folder is displayed along with its other Properties – like the icon used for that folder, its localized name, sharing properties, etc.
In Windows, you can easily configure how any file/folder is shared, accessed by a normal user, how it can be shared, and other settings that control how that file/folder permissions are imposed. All this information about the presentation of that folder is saved in the desktop.ini file, which is the default initialization file format.
Now, if you change the configuration and layout settings of a folder, those changes are automatically stored on the desktop.ini file of that particular folder. This is a hidden file, which means that you have to uncheck “Hide protected operating system files” in the File Explorer Options.
Is desktop.ini a Virus
This desktop.ini hidden operating system file is not a virus. This is a native system file that is stored on folder level, created once you’ve customized the background, icon or thumbnail image, etc. However, there has been a history of the Trojan virus associated with this name. If a desktop.ini file is visible even when you have checked the options to hide hidden as well as the system files, it could be malware. Hence, to be sure, you can always scan your computer using your antivirus program.
Can I delete desktop.ini file
Well, yes you can, but then your folder’s display settings will be restored to default. It is like this – whenever you change the folder icon or the thumbnail image for that matter, sharing properties, etc., all this information gets stored on the desktop.ini file automatically. Now, what would happen if you delete this file from that folder? You guessed it right! Your configured changes will be lost, and folder settings will be switched to system-wide default.
If you delete it once, it will automatically regenerate the next time you customize your folder settings. Now, this process of automatic generation can’t be turned off as it is a defined process at the OS level. However, you can choose to hide it from the general view so that it does not bother you with its presence.
Read: Desktop.ini file opens automatically on startup
How to customize folder using desktop.ini file
Customizing a folder using desktop.ini file is no geeky stuff. You just need to create/update the desktop.ini file native to that folder to update its view and appearance settings. Below are a few noteworthy things that you can do by playing around the desktop.ini file:
- Assign a custom icon or thumbnail image to the parent folder
- Create an info tip which provides information about the folder when you hover the cursor over the folder
- Customize the way the folder is shared or accessed
Follow these steps to modify a folder’s style using desktop.ini file.
1. Choose any folder that you wish to customize using desktop.ini. Make sure that you keep the backup of your files elsewhere so that it can be restored in case anything goes wrong.
2. Run the following command to make the chosen folder a system folder. This will set a Read-only bit on the underlying folder and enable a special behavioral characteristic for the desktop.ini file.
attrib +s FolderName
3. Create a desktop.ini file for the folder in question. Make it hidden and label it as a system file so that it restricts the normal users from accessing the same. You can do so by enabling the Read-only and Hidden flags in Properties window of the desktop.ini file.
Note: The desktop.ini file you create should be in Unicode file format so that the localized strings stored in it as the content is readable to the intended users.
4. Here is my sample of the desktop.ini file created for a folder named FileInfo, as shown in the images.
[.ShellClassInfo] ConfirmFileOp=0 IconFile=ms.ico IconIndex=0 InfoTip=Microsoft Wallpapers
Now, let’s take a look at what does all the content in the desktop.ini file means:
- [.ShellClassInfo] – It initializes the system property which allows you to customize the underlying folder by assigning values to the several attributes that can be defined in a desktop.ini file.
- ConfirmFileOp – Set this to 0, and you won’t get the warning You Are Deleting a System Folder while deleting/moving the desktop.ini file.
- IconFile – If you want to set a custom icon for your folder, you can specify the icon file name here. Make sure to check the absolute path of the file. Specify the full path if the file is not in the same location. Also, .ico file is preferred for setting custom icons, although it is possible to specify the .bmp, .dll files as well which contains icons, but that’s a story for some other day.
- IconIndex – If you’re setting a custom icon for the underlying folder, you need to set this entry as well. Set it to 0 if there is only one icon file in the file specified for IconFile attribute.
- InfoTip – This particular attribute is used to set a text string that can be used as an Informational Tip about the folder. If you set this entry to a text string and then hover the cursor over the folder, the text string stored in the desktop.ini file is displayed there.
See it in action below –
Let us know in the comments section below if you have any other doubts regarding the desktop.ini file in Windows 11/10.
Looking to learn more about other processes, files, file types or formats in Windows? Check these links:
NTUSER.DAT file | Windows.edb files | Thumbs.db files | DLL and OCX files | NFO and DIZ files | Swapfile.sys, Hiberfil.sys & Pagefile.sys | Index.dat file | Svchost.exe | RuntimeBroker.exe | StorDiag.exe | nvxdsync.exe | Shellexperiencehost.exe | Hosts file |WaitList.dat file.