Desktop.ini is a special file on the Microsoft Windows 32 bit operating systems since Windows 95 and NT4. It is used by Internet Explorer to hide deliberately, certain files on the system. In particular, the hidden files include the explorer cache.

If you look Explorer to look in the directory C:\Windows\Temporary Internet Files (95/98) or the NT/2000 equivalent, it appears to be an empty directory. In practice, it is far from empty. There is a hidden directory called Content.IE5, and a file desktop.ini.

Desktop.ini is a standard .ini text file, containing for example:

[.ShellClassInfo]
UICLSID={7BD29E00-76C1-11CF-9DD0-00A0C9034933}
This is actually an instruction to tell the operating system to handle operations on the contents of the directory such as viewing, editing, etc. with a namespace extension. In this instance the extension calls the Browser COM object via SHDOCVW.DLL.

If you delete this file, you can get to the cache contents. Note, the MFC code knows about the magically named folder Content.IE5, and open dialog boxes will not display it unless you specifically ask for it. You need to type in Content.IE5 into the filename box, then you see its contents appear.

In terms of how to remove this file, Perl seems to be immune to the hiding. The following code can be used to zap any desktop.ini files to enable the explorer cache to be visible:

#!perl -w

use File::Find;

# For Win95 + Win98, comment next line, uncomment following.
my $rootdir="C:/WinNT/Profiles";
#my $rootdir="C:/Windows/Temporary Internet Files";

find(sub {unlink "$File::Find::dir/$_" if ($_ eq 'desktop.ini')},
	$rootdir);
Some people have reported that IE recreates the desktop.ini file, but I don't find this to be the case. To prevent this, replace with an empty desktop.ini or edit it and remove the UICLSID= line.

Sources:

  • MSDN
  • http://perlmonks.org/index.pl?node_id=49589

Log in or registerto write something here or to contact authors.