obive.net

Thursday June 1 2006 @ 6:52 PM

Here’s how!

Using a meta tag named “ProgId” with a content value of the registry key under HKEY_CLASSES_ROOT that contains information about the icon. In the registry, you have a key under that ProgId named “HTML Handler”. Under that, you have a key named “Icon”. In that key, you create a new string value using the extension of the file you want to change the icon for as the name, and the data being the file extension that has the icon you want to change to.

You can see in this example I created a new file with an extension HTML. I then specified a ProgId of “testType”. I create a new ProgId in the registry. I pointed to an icon of a text file.

Pretty complicated and completely undocumented: Totally Microsoft.