Helping people with computers... one answer at a time.

Changing display options in Windows Explorer can occasionally have unintended side effects, such as changing the way that your desktop looks.


All of a sudden my desktop has two icons that I never sent there. Both are called desktop.ini. When I try to delete one of these shortcuts, a message appears, saying, "If you remove this file, Windows or another program may no longer work correctly." I've been looking at my desktop every day. The date was modified on the file back about the 21st of July and I am writing you on August 2nd. The only things that I've done differently today are: 1) to change my desktop display to Windows 7 (the plain one, without aero peek outlines) and 2.) to take Leo's advice about "Folder Options" in terms of checking or unchecking items. I also notice that after I changed by folder options (including the one not to hide any hidden folders), some of these new ones say "Access denied" when I click them. Could you provide any explanation for these things?

I can. Those files are displayed because you followed my advice. Smile

Let's take a look at why that is, what I do, and what you might like to do if it bothers you.

Two desktop.ini's

Two desktop.ini files.

As you can see in the image to the right, I have two desktop.ini files on my desktop as well.

This is a direct result of having checked the Windows Explorer option to show hidden files folders and drives.

What most people don't realize is that Windows Explorer is more than just a file viewing application. Windows Explorer is the program that is responsible for displaying the taskbar at the bottom of the screen, acting on your clicks to start or switch to programs, and it's the program responsible for displaying the desktop.

What that means is that the options that you specify for using Windows Explorer to view files apply equally well to Windows Explorer as it displays the desktop. To Windows Explorer, the desktop is just another folder to be displayed in another way.

So why are there two desktop.ini files?

The Windows Desktop folder(s)

In reality, the Windows desktop is a kind of hybrid which is constructed at display time using the contents of two separate folders:

  • C:\Users\username\Desktop

  • C:\Users\Public\Desktop

The first, C:\Users\username\Desktop, where username is replaced with your Windows login ID, is your desktop. By that, I mean that it contains the desktop items that are unique to your login ID. In most cases, that pretty much means everything on your desktop.

The second, C:\Users\Public\Desktop, is a special folder where desktop items that should be displayed for all users are placed. For example, if an application shortcut was required for any user that logged into this machine, one might place it in this folder instead of the per user desktop folder.

When Windows Explorer displays your desktop, it takes the contents of both of these folders and puts them together into a single display. If they contain duplicate items, then you will see two of the same item on your desktop.

And, of course, both folders have a desktop.ini file, which is nothing more than a configuration file that contains some information about how your desktop should be displayed. (You can right-click on each desktop.ini icon and select Properties to see where the file is physically located.)

It's not surprising that you would get "permission denied" trying to manipulate one of the desktop.ini files. The copy in the public folder is likely to require administrative access in order to be modified. And as I've discussed in another article, even though you may be logged in to an account with administrative privileges, that doesn't mean that you actually have the administrative privileges at the time that you're trying to do something.


What to do?

Your options on how to handle this are actually somewhat limited.

As you can see from my example above, I elected to simply live with it. I keep a fairly clean desktop and the two copies of desktop.ini don't really bother me that much.

Your other option is to change the option for displaying hidden files in Windows Explorer back to its default condition, which keeps hidden files hidden from view.

In either case, it's not wise to delete or modify hidden files unless you're certain that you know what you're doing. That's why Microsoft marks them as hidden. In a case such as this in any file, you're welcome to take a look at the contents of the file now that you know it exists, but I would not recommend modifying it in any way or trying to delete it.

Article C4908 - August 21, 2011 « »

Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

John Germann
August 22, 2011 7:09 AM

What if these Icons are both moved into a "new" folder on the deesktop? Would they still work even though they are in the folder?

I don't believe it will be effective. If you can move them I expect Windows will automatically create new ones to replace them.

Mark J
August 22, 2011 7:30 AM

I keep my hidden files hidden in Explorer, but I have them unhidden in a two pane explorer replacement I use. This way I have the best of both worlds. I've also deleted the desktop.ini file several times with no ill effects, other than rearranging the icons. However, you can't really get rid of it. A new one always comes back. And no, moving it to a new location won't work.

Dan Lauber
August 23, 2011 9:37 AM

I've always set Windows (XP and 7) to show hidden folders and drives, as well as system files. While these desktop.ini files have appeared a handful of times on my desktop, I've deleted them from my desktop with no negative effects. Don't know if this would work for everybody, but it's been my consistent experience with our 5 computers and every one of the 60 or so I've built or upgraded.

August 23, 2011 10:33 AM

On my W7 system I simply deleted these files from the desktop. They have never come back and I see absolutely no difference in operation.

August 23, 2011 12:17 PM

I must be missing something. In XP I have always selected "Show hidden files and folders" and unchecked "Hide protected operating system files", yet I have never had an .ini file display on my Desktop. Is this something new in Vista or 7?

August 23, 2011 4:33 PM

Hmmm. Thought I had another solution: Don't show hidden files for the Desktop folder, but don't Apply to Folders. Didn't work, applied to all folders without clicking that option.

Bill Landau
August 23, 2011 5:32 PM

I use a slightly different approach. I select "Show hidden files, folders, and drives" but check "Hide protected operating system files (Recommended)." On the desktop, no desktop.ini files.

Of course, if I go to a folder such as system32, I will probably have to change that.

August 23, 2011 11:05 PM

well, i am a bit troubled here. each time i attach removable dvd writer, along with the files on the disk a 'Desktop.ini' appears under files waiting to be written to the disk. I haven't enabled any display of system protected files.

help please?

August 24, 2011 10:38 AM

I have to ask why you want to keep these files? Just as all ripped media finds it necessary to add these .ini files, they don't appear to do anything to non-essential files other than take up space. I have deleted all the .ini files that were added to my collection of over 10,000 music files and have yet to see a difference in how they appear or function. Just me, but I hate having unnecessary files, makes it that much more difficult to see the forest for the trees.

August 25, 2011 8:41 PM

I show all my hidden files/folders then hide the desktop.ini files under my gadgets.

August 27, 2011 9:43 AM

Can't they be dropped in an unused desktop icons folder ..

August 30, 2011 11:59 AM

Just use FreeCommander (or another filemanager you like more) and you can make the way you see your files exactly as you want it without changing anything on your desktop. The two panel view of a filemanager should have been introduced by microsoft long ago but ...? I almost never make use of Windows Explorer--file copying by using F5 is a lot faster than Ctrl-C etc.

March 16, 2013 10:24 PM

I see this article is from a couple years ago, but there is an easy fix for this, at least for users of Windows 8. Those "desktop.ini" icons started to show up everywhere, as well us "thumbs.ini" and what-not, and I thought I messed something up or had a virus of some kind. To get rid of it, I went to my documents folder. At the top of the page, click "view". You will see a checkbox where you can uncheck "hidden items". Voila! No more desktop.ini icons anywhere!

March 25, 2013 5:54 AM

This is not a solution for most users since they want to see ALL files on their system and also get rid of those files (delete them). As @edc stated in most cases it doesn't even make a single difference if they exist or not. I usually keep deleting them, but Windows also keeps generating them after a short amount of time. In Windows 7 there was a way to prevent those files from being created and I assume Windows 8 has an option for that too but sadly no one knows about it.
{link removed, off topic}

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to to ask your question.