If a shell folder in your Windows 7 computer has lost its special icon and showing up as a generic (yellow) folder, you need to create/fix the Desktop.ini file for the shell folder. For Windows Vista, use the instructions in article Shell folders are displayed with the standard folder icon in Windows Vista. The default contents of the desktop.ini file for various shell folders in Windows 7 are provided below. For each shell folder (that’s missing the special icon) create a file named desktop.ini and add corresponding content.

Desktop.ini Contents for Various Shell Folders

Contacts

[.ShellClassInfo]
LocalizedResourceName=@%CommonProgramFiles%\system\wab32res.dll,-10100
InfoTip=@%CommonProgramFiles%\system\wab32res.dll,-10200
IconResource=%SystemRoot%\system32\imageres.dll,-181

Documents

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235

Desktop

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769
IconResource=%SystemRoot%\system32\imageres.dll,-183
[LocalizedFileNames]
GameExplorer.lnk=@%SystemRoot%\system32\gameux.dll,-10082
Windows Media Player.lnk=@%SystemRoot%\system32\unregmp2.exe,-4
Chess.lnk=@%SystemRoot%\system32\gameux.dll,-10054
FreeCell.lnk=@%SystemRoot%\system32\gameux.dll,-10055
Hearts.lnk=@%SystemRoot%\system32\gameux.dll,-10056
Internet Checkers.lnk=@%SystemRoot%\system32\gameux.dll,-10101
Minesweeper.lnk=@%SystemRoot%\system32\gameux.dll,-10057
Spider Solitaire.lnk=@%SystemRoot%\system32\gameux.dll,-10061

Downloads

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21798
IconResource=%SystemRoot%\system32\imageres.dll,-184

Favorites

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21796
IconResource=%SystemRoot%\system32\imageres.dll,-115
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-173

Links

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21810
IconResource=%SystemRoot%\system32\imageres.dll,-185
DefaultDropEffect=4
[LocalizedFileNames]
RecentPlaces.lnk=@shell32.dll,-37217
Desktop.lnk=@shell32.dll,-21769
Downloads.lnk=@shell32.dll,-21798

Music

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21790
InfoTip=@%SystemRoot%\system32\shell32.dll,-12689
IconResource=%SystemRoot%\system32\imageres.dll,-108
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-237

Pictures

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21779
InfoTip=@%SystemRoot%\system32\shell32.dll,-12688
IconResource=%SystemRoot%\system32\imageres.dll,-113
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-236

Recent

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21797
InfoTip=@shell32,dll,-12692
IconResource=%SystemRoot%\system32\imageres.dll,-117
CLSID={0C39A5CF-1A7A-40C8-BA74-8900E6DF5FCD}

Saved Games

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21814
IconResource=%SystemRoot%\system32\imageres.dll,-186

Searches

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-9031
IconResource=%SystemRoot%\system32\imageres.dll,-18
[LocalizedFileNames]
Indexed Locations.search-ms=@searchfolder.dll,-32820
Everywhere.search-ms=@searchfolder.dll,-32822

Enable Read-Only and Hidden Attributes for the Desktop.ini file

After adding contents and saving the desktop.ini file, right-click the file desktop.ini and choose Properties.

Place checkmarks near Hidden and Read-only attributes, and click OK.

Press {F5} to refresh the folder views, and see if the special folder icon is restored. Or better, you may check again after a reboot cycle.

If the icons are not refreshed, you need to set the read-only attribute for the shell folder if it’s not already set.

Setting the Read-Only Attribute for the Special Folder

Open a Command Prompt (CMD.EXE) window. To do so, click Start, click All Programs, click Accessories, click Command Prompt. Using the Attrib command, set the Read-only attribute for the shell folder. Here is an example, which explains how to set the Read-Only attribute for the special folder "Downloads"

Note: Where Ramesh (in the above example) is the user account name, and Downloads is the shell folder name. You may run the Attrib command from any Command Prompt path, as long as you mention the full path to the folder, as in the above example.

Tip: Alternately, you could use the Copy as Path shell command to copy a shell folder path to the clipboard, and paste it in the Command Prompt so that you don’t have to manually type the entire path.


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

5 Comments

  1. FocusedWolf
    said this on Friday, February 7th 2014 12:31 am

    Hmm type in my last comment. It’s just: D:\Wolf\Desktop>attrib +a +s +h desktop.ini

  2. FocusedWolf
    said this on Friday, February 7th 2014 12:28 am

    Here’s how to hide desktop.ini

    D:\Wolf\Desktop>attrib +a +s +h desktop.ini attrib +a -s -h desktop.ini.

    If you want to check how desktop.ini is configured in another folder, just navigate there and do >attrib desktop.ini to see what flags are set.

  3. Peter Lundquist
    said this on Monday, November 21st 2011 9:46 pm

    For “Downloaded Program Files”, make sure the folder has the system and read-only attributes set.

    C:\Windows>attrib +s +r “Downloaded Program Files”

    I had the same issue, and this resolved it.

  4. said this on Saturday, April 3rd 2010 10:16 am

    @anon: Same problem here, in Windows 7 RTM 64-bit. Desktop.ini is intact, set the “RO” attribute for DPF via admin Cmd Prompt, but nothing changed.

  5. anon
    said this on Saturday, April 3rd 2010 9:14 am

    On my Windows 7 RTM 32-bit, “Downloaded Program Files” folder is behaving like a regular folder instead of showing ActiveX objects with special columns. I have tried registering occache.dll elevated as this article (http://support.microsoft.com/kb/174925) suggests and making sure its desktop.ini is unmodified and has correct attributes but no use.

Leave a Reply