Icons *.ico are not displayed as icons

English support forum

Moderators: Hacker, petermad, Stefan2, white

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Delete key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ico (the "open with" key, dependent on user).

This is the key TC looks in first when trying to see which program to start when double clicking or which icon to display.
Probably you have linked ico-files to an application which now isn't installed anymore and therefore the icon in HKEY_CLASSES_ROOT\Applications can't be found anymore.

Explorer checks key HKEY_CLASSES_ROOT\.ico first (machine dependent key), that's why it still displays the icon correctly.

TC behaviour is correct because it prefers user dependent file extensions!

Icfu
Sknerus
Junior Member
Junior Member
Posts: 8
Joined: 2004-01-21, 15:10 UTC

Post by *Sknerus »

Well... IT WORKS :) Thank you!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Explorer checks key HKEY_CLASSES_ROOT\.ico first (machine dependent key), that's why it still displays the icon correctly.
Hmm, that's odd - why should Explorer check this first for icons, but use the user-specific for starting the program? This would show the wrong icon, e.g. when the system association points to word and the user-specific to wordpad, Explorer should show the wordpad icon because it starts wordpad!

Btw, I couldn't find any documentation in which order Explorer executes these keys, I had to figure it out all by myself. Any ideas?
Author of Total Commander
https://www.ghisler.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Hmm, that's odd - why should Explorer check this first for icons, but use the user-specific for starting the program? This would show the wrong icon, e.g. when the system association points to word and the user-specific to wordpad, Explorer should show the wordpad icon because it starts wordpad!
Nope, misunderstanding maybe? Explorer uses the user-specific 'open with' setting in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts (to make it clearer, the entry 'Application' points to the exe-entry in HKCR\Applications from which the correct open command is chosen) ONLY when there is NO machine dependent association in HKCR! The icon is extracted from the exe IF there is no additional 'DefaultIcon' entry under HKCR\Applications\exename.

The problem with that strange logic is, that most programmers don't know which key to change (HKCR or HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts) when they wanna associate their apps to file extensions.
Btw, I couldn't find any documentation in which order Explorer executes these keys, I had to figure it out all by myself. Any ideas?
Actually I'm not a programmer, all my knowledge concerning that matter I got through the usage of Regmon by sysinternals.com.

The inconsequence of MS' implementation has driven me mad quite often. Besides the well known user and machine dependent associations there are additional associations by file groups and additional extensions under HKCR\SystemFileAssociations which are not available under older OSes, invented firstly under XP if I am correct.

Really hard to keep track.

Icfu
Post Reply