Windows desktop.ini file – All you need to know

Ivan Jenic
by Ivan Jenic
Troubleshooting Expert
0 Comments
Download PDF
Affiliate Disclosure

  • One of the mysteries Windows users may occasionally face is the presence of a desktop.ini file on their Desktop. Since the majority of users don't know what these files are, some people usually perceive them as a virus.
  • The .ini files in Windows are nothing like that. They're just inert, text files that contain configuration data used by various programs.
  • If you happen to meet with some problems regarding the system files, go straight to our Troubleshooting Hub for expert guidance. 
  • There no shame in missing a few tech slang words from your vocabulary. However, you can tackle that with our Tech Definitions section.
fix windows 10 icon

One of the mysteries Windows users may occasionally face is the presence of a desktop.ini file on their Desktop.

In fact, desktop.ini usually shows in form of two identical .ini files sitting on our Windows 10 Desktop.

Since the majority of users don’t know what these files are, some people usually perceive them as a virus, or some kind of a dangerous script that can destroy their data.

However, desktop.ini files are nothing like that, and in this article, we’re going to talk about this type of file, whether they’re dangerous or not, and how to prevent them from showing up.

What are the .ini files?

First things first, .ini files in Windows are not a script or some kind of dangerous virus that’s going to eat your data. They’re just inert, text files that contain configuration data used by various programs.

Most of these files contain data like system file locations, or windows files, required by certain programs to run. You can open any .ini file with Notepad to see what it contains.

What is the desktop.ini file?

The desktop.ini file is a hidden file that stores information about a Windows folder. So, if the layout or settings of a folder are changed, the system generates a desktop.ini file automatically to save the changes.

Here’s what a .ini file usually contains:

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%system32shell32.dll,-21769
IconResource=%SystemRoot%system32imageres.dll,-183

Almost every program installed on your computer requires a .ini file to run properly. So, even if you delete a .ini file, the program that used it will create it again.

Ini files are usually hidden, and the only reason you’re seeing them right now is because you’ve set File Explorer to Show hidden files. In short words, .ini files have always been present on your computer, you just weren’t able to see them.

Why are .ini files present on my Desktop?

If .ini files are used by apps, programs, and folders, how come my Desktop shows them? Well, Desktop is just another folder on your computer that’s unique for every user account.

Actually, there are two Desktop folders in your computer, the one from your user files, and the one from the public folder.

The Desktop you’re seeing on your computer is a combination of these two folders. Therefore, there are two Desktop.ini files, for each Desktop folder.

Deleting Desktop.ini files is not advisable, although it can’t cause any serious damage to your computer. Anyway, it’s safer to just hide them.

If seeing .ini files on your Desktop and File Explorer is annoying to you, just change a few settings, and these files will be hidden again. If you don’t know how to do that, keep reading this article.

How to hide desktop.ini files o Windows 10

Now that we know what .ini files are, let’s see what we can do to make them disappear. So, here’s what you need to do (you can use the same method to see .ini files, just do the opposite steps):

  1. Go to Search, type folder options, and open File Explorer Options
  2. Head over to the View tab
  3. Check the Don’t show hidden files, folder, or drives, and check the Hide protected operating system files option.desktop.ini windows 10
  4. Click OK.

There you go, after performing this action, you won’t be seeing Desktop.ini, or any other files of this kind anymore.

Can I delete the desktop.ini file?

Of course you can delete the desktop.ini file but you shouldn’t do that. The file saves the settings of the folder which contains it so, in you delete it, those will be lost and the settings will return to default.

How to create a desktop.ini file?

  1. To transform a usual folder into a system folder, first, use PathMakeSystem. You can also do that from the command line by using attrib +s Nameofthefolder.
  2. Next, create a Desktop.ini file for the folder. Mark it as hidden and system to ensure that it is hidden from normal users.
  3. Make sure that the Desktop.ini file created by you has the Unicode format. This is needed to store the localized strings that can be displayed to users.

How can I get rid of the desktop.ini file in windows 10?

To delete a desktop.ini file, just right-click on it and select Delete from the drop-down menu, or select it and hit Delete on your keyboard. However, it’s not recommended to delete any .ini file.

What keeps making desktop.ini files?

If the layout or settings of a system folder change, the system generates a desktop.ini file automatically to save the changes.

So, the system creates them, but by default you shouldn’t see them at all because they are hidden protected system files.

We hope that you now understand what .ini files are and that there’s no reason to fear your computer security has been compromised if you notice them.

If you have any comments, questions, or suggestions, just let us know in the comments below.

FAQ: Read more about desktop.ini files

  • Why are there 2 desktop INI files on my desktop?

The Desktop displayed by Windows is a combination of your user’s Desktop and the Public Desktop folder. So there are two desktop.ini files because there are in fact two folders, each with its own desktop.ini.

  • Is Desktop ini a virus?
The answer is no, the desktop.ini file is not a virus. The file is a protected system file that normally is hidden so you shouldn’t see it at all. If your computer is infected, check out our best antivirus software list.
  • How do I stop the Desktop ini from popping up?

All you need to do is to check the Hide Protected Operating System Files option from File Explorer.

Editor’s Note: This post was originally published in November 2016 and has been since revamped and updated in May 2020 for freshness, accuracy, and comprehensiveness.