Desktop.ini is a hidden system file used by Windows to store folder customization settings, such as a folder’s custom icon, its tooltip text, and how File Explorer displays its contents. You typically encounter it when you enable “Show hidden files” or “Show protected operating system files” in File Explorer. This article explains what desktop.ini does, why it exists, and how to safely view, edit, or create it.
What Exactly Is desktop.ini?
Desktop.ini is a plain-text file that Windows places in a folder to store that folder’s display preferences. It is not a program and cannot run code. Its purpose is to let a folder remember things like:
- A custom icon or thumbnail image
- A custom tooltip (the text that appears when you hover over the folder)
- Whether the folder is a system folder like “My Documents” or “Pictures”
- How File Explorer sorts or displays files in that folder (e.g., using a specific view template)
The file is hidden by default, and it is present in almost every folder on your system, though you rarely see it. It is a standard Windows component, not a virus or malware. However, because it is hidden and has a name that looks technical, some users worry when they first spot it.
How desktop.ini Works
Desktop.ini works by storing key-value pairs in a section called [.ShellClassInfo]. The most common entries are:
IconResource– points to an icon file (e.g.,C:\Icons\myicon.ico)InfoTip– sets the tooltip text for the folderFolderType– defines the folder template (e.g.,PicturesorMusic)LocalizedResourceName– makes the folder name display in another language
When Windows opens a folder, it reads the desktop.ini file and applies those settings. If the file is missing, the folder uses default Windows settings.
Why Is It Called “desktop.ini”?
The name comes from the fact that the file was originally used to customize the Windows desktop itself. In early versions of Windows, a file called desktop.ini in the Desktop folder controlled icons and layout. Over time, the same mechanism was extended to all folders. The name stuck, even though it now applies to every folder on your system.
How to View and Edit desktop.ini
To see desktop.ini files, you must enable “Show hidden files” and “Show protected operating system files” in File Explorer. Here’s how:
- Open File Explorer and click the View tab.
- Check the box Hidden items (this shows hidden files).
- Click Options on the right, then go to the View tab.
- Uncheck Hide protected operating system files and confirm the warning.
Once you can see the file, you can open it with Notepad to view its contents. To edit it, right-click the file, choose Open with, and select Notepad. Make your changes, save, and the folder will update immediately (you may need to refresh the view).
Common Problems and Misconceptions
One common misconception is that desktop.ini is a virus. It is not. However, some malware can hide in folders and use desktop.ini to disguise itself. If you find a desktop.ini file in a folder where you did not expect one, it is usually harmless. But if you also see suspicious files in the same folder, run a full antivirus scan.
Another issue: if you delete desktop.ini, the folder loses its custom icon or tooltip, but nothing breaks. Windows will recreate it when you customize the folder again. Deleting it is safe but not recommended if you want to keep your customizations.
How to Create Your Own desktop.ini
You can create a desktop.ini file manually to give a folder a custom icon or tooltip. Here’s a simple example:
- Create a new text file in the folder and name it
desktop.ini(make sure you have file extensions visible). - Open it with Notepad and paste the following:
[.ShellClassInfo] IconResource=C:\icons\custom.ico,0 InfoTip=My custom folder
- Save the file. Then right-click the folder, choose Properties, go to the Customize tab, and click Change Icon to select the icon you want. Windows will update the desktop.ini automatically.
If you want to set the icon manually, you can also just use the Properties dialog – you don’t need to write the file by hand. The manual method is only for advanced users who want to script folder customization.
Frequently Asked Questions
Is desktop.ini a virus?
No. Desktop.ini is a legitimate Windows system file. It is not malicious. However, some malware may use the same name to hide, so if you see it in an unusual location (like a USB drive) and you also see other suspicious files, scan your system with a reputable antivirus program.
Can I delete desktop.ini?
Yes, you can delete it. The folder will simply lose any custom settings (icon, tooltip, etc.). Windows will not break, and the file may be recreated if you customize the folder again. It is safe to delete, but if you want to keep your customizations, leave it alone.
Why is desktop.ini hidden?
Windows hides it because it is a system file that users don’t need to see. It also prevents accidental deletion or modification. The file is marked with the Hidden and System attributes, so it only appears if you explicitly enable showing hidden and system files.
How do I show desktop.ini files?
Open File Explorer, go to the View tab, and check Hidden items. Then go to Options > View and uncheck Hide protected operating system files. You will then see all desktop.ini files.
What happens if I edit desktop.ini incorrectly?
If you edit it incorrectly, the folder may lose its custom icon or tooltip, or it may show a generic icon. It will not crash your system. You can always delete the file and start over, or use the folder’s Properties dialog to reset the settings.
Does desktop.ini affect performance?
No. The file is tiny (a few hundred bytes) and is only read when you open the folder. It has no noticeable impact on system performance.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Factory Reset iPad If You Forgot Password
- Ubuntu in Windows Store: Which Editions Work?
- Secure Guest Account on Windows 11: Step-by-Step
- Stop Outlook From Changing Hyperlink Font
- Hiberfil.sys: What It Is & How to Delete It
- How to Make a Mask on Snapchat: Step-by-Step