Why don't per-item custom icons work when I open a Zip file or some other virtual folder?

Raymond Chen

A customer observed that when they opened a Zip file containing an Excel spreadsheet saved as XML, the icon for the spreadsheet in the Zip folder is just a plain XML icon rather than a fancy Excel-XML icon. “Is there any way to invoke a shell icon handler on an item inside a Zip folder?” Even if there were a way, you wouldn’t like it. Think about it: In order to determine whether the XML file should get a plain-XML icon or an Excel-XML icon, the Office icon handler needs to open the XML file and sniff around to see if has whatever it is that makes an XML file an Excel-XML file. This means that the Zip folder has to extract the file so that the icon handler can sniff it. This means that opening a Zip folder would result in decompressing every file in it just so that it can give the decompressed file to the icon handler so the icon handler can say what icon to show. You probably wouldn’t like that.

Therefore, Zip folders do not use icon handlers to obtain icons for items inside Zip files. It just uses the generic icon for the file extension.

0 comments

Discussion is closed.

Feedback usabilla icon