Html files have no icon

How to change the icon of html files?

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

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 .

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.

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 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.

Читайте также:  Сменить версию php nic ru

@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.

Источник

Total Commander

Power Member

fenix_productions Power Member
Posts: 1978 Joined: 2005-08-07, 13:23 UTC Location: Poland Contact:

Missing icons for HTML files

Post by *fenix_productions » 2010-09-09, 19:47 UTC

I have encountered strange phenomena on my work PC:

empty HTML files have standard blank icon in TC.

Observations so far:
— by default HTML files are associated with Internet Explorer,
— non-empty files have proper IE icon shown,
— Windows Explorer has no problems with such blanks.

Does anybody have an idea why TC behaves this way?

«When we created the poke, we thought it would be cool to have a feature without any specific purpose.» Facebook.

Site Admin

ghisler(Author) Site Admin
Posts: 46016 Joined: 2003-02-04, 09:46 UTC Location: Switzerland Contact:

Post by *ghisler(Author) » 2010-09-13, 14:12 UTC

Power Member

fenix_productions Power Member
Posts: 1978 Joined: 2005-08-07, 13:23 UTC Location: Poland Contact:

Post by *fenix_productions » 2010-09-13, 14:31 UTC

2ghisler(Author)
TC shows (Associate with):
HTML Document («C:\Program Files\Internet Explorer\IEXPLORE.EXE» -nohome)

Which keys should I export from Registry for you?

«When we created the poke, we thought it would be cool to have a feature without any specific purpose.» Facebook.

Site Admin

ghisler(Author) Site Admin
Posts: 46016 Joined: 2003-02-04, 09:46 UTC Location: Switzerland Contact:

Post by *ghisler(Author) » 2010-09-16, 15:19 UTC

Please export the key
HKEY_CLASSES_ROOT\HTML Document

and the key
HKEY_CLASSES_ROOT\.html

and finally
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html

Power Member

fenix_productions Power Member
Posts: 1978 Joined: 2005-08-07, 13:23 UTC Location: Poland Contact:

Post by *fenix_productions » 2010-09-21, 09:17 UTC

2ghisler(Author)
I am sorry for delay.

HKEY_CLASSES_ROOT\HTML Document does not exist on my work PC.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.html]
@=»htmlfile»
«Content Type»=»text/html»
«PerceivedType»=»text» [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\OpenWithList]
«a»=»Dreamweaver.exe»
«MRUList»=»cfahbged»
«b»=»firefox.exe»
«c»=»iexplore.exe»
«d»=»WINWORD.EXE»
«e»=»TOTALCMD.EXE»
«f»=»connect.exe»
«g»=»ToDoList.exe»
«h»=»notepad++.exe» [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\OpenWithProgids]
«htmlfile»=hex(0):
«FirefoxHTML»=hex(0):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\htmlfile]
@=»HTML Document»
«FriendlyTypeName»=»@C:\\WINDOWS\\system32\\ieframe.dll.mui,-912»
«EditFlags»=hex:00,00,00,00
«BrowserFlags»=dword:00000008 [HKEY_CLASSES_ROOT\htmlfile\shell\Edit\command]
@=»\»c:\\Program Files\\Microsoft Office\\Office12\\msohtmed.exe\» %1″ [HKEY_CLASSES_ROOT\htmlfile\shell\open]
@=»Open in S&ame Window»
«MUIVerb»=»@C:\\WINDOWS\\system32\\ieframe.dll.mui,-5732» [HKEY_CLASSES_ROOT\htmlfile\shell\open\command]
@=»\»C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE\» -nohome» [HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec]
@=»\»file://%1\»,,-1. »
«NoActivateHandler»=»» [HKEY_CLASSES_ROOT\htmlfile\shell\opennew]
«MUIVerb»=»@C:\\WINDOWS\\system32\\ieframe.dll.mui,-5731»
@=»&Open» [HKEY_CLASSES_ROOT\htmlfile\shell\opennew\command]
@=»\»C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE\» %1″ [HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec]
@=»\»%1\»,,-1,0. »
«NoActivateHandler»=»» [HKEY_CLASSES_ROOT\htmlfile\shell\Print\command]
@=»\»c:\\Program Files\\Microsoft Office\\Office12\\msohtmed.exe\» /p %1″ [HKEY_CLASSES_ROOT\htmlfile\shell\printto\command]
@=»\»C:\\WINDOWS\\system32\\rundll32.exe\» \»C:\\WINDOWS\\system32\\mshtml.dll\»,PrintHTML \»%1\» \»%2\» \»%3\» \»%4\»»

«When we created the poke, we thought it would be cool to have a feature without any specific purpose.» Facebook.

Site Admin

ghisler(Author) Site Admin
Posts: 46016 Joined: 2003-02-04, 09:46 UTC Location: Switzerland Contact:

Post by *ghisler(Author) » 2010-09-23, 15:47 UTC

The IconFile entry is set to %1, which means that the icon handler from
[HKEY_CLASSES_ROOT\htmlfile\ShellEx\IconHandler]
should be used. Apparently this doesn’t work. Maybe you turned off icons for EXE/LNK files? In this case, TC will not use icon handlers like the one above.

Power Member

fenix_productions Power Member
Posts: 1978 Joined: 2005-08-07, 13:23 UTC Location: Poland Contact:

Post by *fenix_productions » 2010-09-23, 19:07 UTC

2ghisler(Author)
My TC configuration at work is almost the same as at home which means:
http://fenixproductions.pl/files/icons.png

I have also noticed that icons for HTML files which are in ZIPs (big blue e only) differs from non-compressed ones (blank sheet of paper with e ).

My work PC has Windows XP with SP 2 only — maybe this matters somehow.

«When we created the poke, we thought it would be cool to have a feature without any specific purpose.» Facebook.

Power Member

Balderstrom Power Member
Posts: 2148 Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom » 2010-09-23, 19:46 UTC

what happens if you associate HTML with another program ?
Like Opera or FireFox? do you get the same kind of blank icon issues?

And then manually reassociate the html back to IE.

Power Member

fenix_productions Power Member
Posts: 1978 Joined: 2005-08-07, 13:23 UTC Location: Poland Contact:

Post by *fenix_productions » 2010-09-23, 20:55 UTC

2Balderstrom
Didn’t try to play with it yet because I thought it would be better to know the reason behind mentioned issue. I know I can fix it easily with simple reassignment but it will leave the question unanswered.

In the other hand, it can be some strange TC bug and there will be no chances for fix if I give up too early.

So for the time being I will keep my assignments as they are and maybe change them in next month or so (after Christian get bored ).

«When we created the poke, we thought it would be cool to have a feature without any specific purpose.» Facebook.

Power Member

Balderstrom Power Member
Posts: 2148 Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom » 2010-09-23, 21:07 UTC

I guess, but you could back up the registry.
Make the change, and the change back to IE.
Back up again, and diff the two files and see what is actually wrong to start with.

And if there’s nothing wrong there, possibly an internal association issue — if you’ve defined anything for html.

And/Or that checkbox [x] EXE/Lnk not on net.

Power Member

MVV Power Member
Posts: 8682 Joined: 2008-08-03, 12:51 UTC Location: Russian Federation

Post by *MVV » 2010-09-24, 04:32 UTC

fenix_productions, on my work computer I have same thing — but files are associated with Mozilla. 0-byte .htm file has blank icon, 1-byte .htm file has Mozilla icon. With clean INI too.

Some affected extensions: HTM HTML MHT XML.

It seems that only browser files have such interesting ‘bug’.

I’ve exported HKEY_CLASSES_ROOT key to get registered extensions and then made batch file to create test files for all extensions (more than 500 ones) with zero and nonzero size, here additional extensions that have different icons: ANI CDF CUR DLL HT ICO JOB LNK MHTML MSC ODC OTF PIF SCF SCP SCF TTC TTF XHT.

Power Member

fenix_productions Power Member
Posts: 1978 Joined: 2005-08-07, 13:23 UTC Location: Poland Contact:

Post by *fenix_productions » 2010-09-24, 08:11 UTC

2MVV
Do you also have completely different icons for problematic files which are zipped?

«When we created the poke, we thought it would be cool to have a feature without any specific purpose.» Facebook.

Power Member

MVV Power Member
Posts: 8682 Joined: 2008-08-03, 12:51 UTC Location: Russian Federation

Post by *MVV » 2010-09-24, 11:20 UTC

Extensions of empty files that have same empty icons inside of ZIP: CDF CUR DLL ICO OTF PIF (BTW I see another empty icon for CDF, OTF, PIF — like TOTALCMD.exe,3)

Extensions of empty files that have system icon inside of ZIP: HT HTM HTML MHT MHTML MSC ODC OTF XHT XHTML XML (BTW most of icons here are different with icons of non-empty files in normal folder — e.g. for HT extension in normal folder I see 32x32x4 icon shrinked to 16×16 and inside of ZIP I see 16x16x32bit icon — both icons are part of single icon associated with extension; in case of HTM I see completely different icons: in normal folder I see fox, globe and white sheet and in ZIP I see fox and globe w/o white sheet).

Site Admin

ghisler(Author) Site Admin
Posts: 46016 Joined: 2003-02-04, 09:46 UTC Location: Switzerland Contact:

Post by *ghisler(Author) » 2010-09-24, 12:23 UTC

Files inside archives are different, they cannot be handled by shell extensions. So since the default icon entry is empty (%1), TC has to take the icon from the associated EXE file instead.

  • Total Commander
  • ↳ Spam trap (do not post here!)
  • ↳ Total Commander (Deutsch)
  • ↳ Total Commander (English)
  • ↳ Total Commander (Français)
  • ↳ Total Commander Pocket
  • ↳ Total Commander for Android
  • ↳ Total Commander for Windows Phone 8.1
  • ↳ Plugins and addons: devel.+support (English)
  • ↳ Total Commander Polls (English)
  • Total Commander bugs and suggestions
  • ↳ TC11.x bug reports (English)
  • ↳ TC suggestions (English)
  • ↳ TC10.x bug reports (English)
  • ↳ TC9.5x bug reports (English)
  • ↳ TC9.2x bug reports (English)
  • ↳ TC9.1x bug reports (English)
  • ↳ TC9.0x bug reports (English)
  • ↳ TC8.5x bug reports (English)
  • ↳ TC8.0x bug reports (English)
  • ↳ TC7.56(a)/7.57 bug reports (English)
  • ↳ TC7.5x(a) final bug reports (English)
  • ↳ TC Fixed bugs
  • ↳ TC Behaviour which will not be changed
  • ↳ Bug reports from previous betas (unresolved)
  • User to user forums in other languages
  • ↳ Dutch (Nederlands)
  • ↳ Slovak and Czech
  • ↳ Spanish (Castellano)
  • ↳ Other forums (links)

Источник

Оцените статью