3

Windows (at least XP and Vista, I haven't tried 7) refuses to honor my setting of the icon to show for html files. It insist in showing the paper sheet with the IE logo on it.

On XP I changed the icon through Folder options > File Types and for Vista I used FileTypesMan. But it does not work at all.

How can I do this?

4 Answers 4

1

An application could have installed an Icon Handler to provide a custom icon depending on file contents. For example, Microsoft Office installs icon handler to display custom icons for HTML files created in Word or Excel.

If there's an Icon Handler, Windows wouldn't use icon from DefaultIcon.

So try to remove the key:

HKEY_CLASSES_ROOT\htmlfile\shellex\IconHandler

Then Explorer will use icon specified in DefaultIcon:

HKEY_CLASSES_ROOT\htmlfile\DefaultIcon

There's no need to restart Explorer. If the icon does not change immediately, then restart Explorer.


Otherwise grvanchal provided steps to change the icon.

3
  • This works, but it breaks existing functionality, i.e. those files meant to show a custom icon will show the default instead. The Icon handler has its own default icon (which is different from the Windows' default), is it possible to set somewhere else the Icon Handler's default?
    – GetFree
    Mar 11, 2013 at 20:32
  • @GetFree I guess there's no easy way around it: you either have the Icon Handler or not. If there's an icon handler, it has the full control over the displayed icon. The handler DLL from MS Office 2007 has no icons in it. I'm pretty sure, there are no icons in the handler DLL in subsequent Office versions so it extracts the icons from other files. One can think it should use the DefaultIcon setting where customized icons are not applicable. And I agree. But that doesn't seem to be the case. Mar 12, 2013 at 14:23
  • @GetFree I don't know from where Office extracts the icons. If you find that DLL or EXE, you can modify the default icon to something else. You can use Process Explorer to see which files the Icon Handler opens. However it wouldn't be an easy task since Explorer uses many shell extensions. Mar 12, 2013 at 14:26
2

The values for icons are located in registry.

Go to RUN and type regedit

Go to HKEY_CLASSES_ROOT\.html

Then check the default. For example I have chromium browser So my default key is ChromiumHTM.

Go to the name of key in default:

HKEY_CLASSES_ROOT\{YOUR DEFAULT BROWSER KEY}\DefaultIcon

Example:

HKEY_CLASSES_ROOT\ChromiumHTM\DefaultIcon

Change the default value for that key to desired icon. Restart explorer.exe and your icon is changed.

3
  • The default type says htmlfile. I went to that key, and under DefaultIcon is the exact path I set myself with FileTypesMan.
    – GetFree
    Mar 6, 2013 at 21:24
  • Did you kill the process and start the explorer.exe or restart?
    – grvpanchal
    Mar 6, 2013 at 23:41
  • Yes, I restarted, but it didn't work.
    – GetFree
    Mar 7, 2013 at 3:43
0

I can suggest you Other way for using Different Icon for your HTML file. Its totally different way but It could give you the Result you want....

Right click on Desktop >> New >> Shortcut And Choose your File. Then You can Change Icon of that Shortcut by Right click on it >> Properties >> Change Icon. Then you can Move That Shortcut file anywhere you want to

1
  • Yes, but search the same question on Internet and came on this Page. I read those Answer I was also thinking like This might Help someone other who is having same question. and If he want the result as me.. :) Jan 9, 2016 at 20:33
-1

A solution from link

Right click Desktop, go to Properties>Appearance
Click "Advanced", choose "Icon" and change size to something other than it's current size.
Press "OK" to confirm changes in all relevant dialogue windows.
When the icons have changed, restore the size to its original value.

This should force a redraw of all icons, clearing the old images.

1
  • 1
    The problem is not the icon cache. I used TweakUI to rebuld the icons, but they stay the same.
    – GetFree
    Mar 6, 2013 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .