[BUG] default action on ENTER/double click

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

[BUG] default action on ENTER/double click

Post by *roentgen »

TC refusez to open .ico files on double click or pressing enter.
I have default Windows file associations
Still they open up just fine in explorer with the 'Windows Picture and Fax Viewer' and on right click the default menu entry 'Preview' appears both in TC and explorer
Diging into registry I see there actually is no real association for .ico files :roll: but there's a strange looking key (how tipical...)

Code: Select all

"PerceivedType"="image"
wich seems to tell explorer to look further into

Code: Select all

HKEY_CLASSES_ROOT\SystemFileAssociations\image
Same thing with some other extensions wich have "PerceivedType"="text" that open with Notepad only in explorer
TC for Linux please!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

For the 8395th time:
TC prefers user key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\ when double clicking. If user key contains wrong associations it doesn't continue looking in the machine key, that's why it fails.

So, check HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ico, this is the "open with" key. If you delete it, everything will work again.

This key is also deleted when you reassign .ico with File->Associate. Nah, actually it's not the key but an entry in that key, ProgID or so.

That "PerceivedType" stuff has no effect in TC, it's only relevant for Explorer. ghisler hasn't emulated Explorer behaviour completely, he can only try to guess what it's doing. ;)

Icfu
This account is for sale
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

Even so... does not seem any good to me... it's a loss of functionality to the less experienced users
TC for Linux please!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

"PerceivedType"="image"
Sorry, Total Commander does not use this key. It's not well documented by Microsoft, and I will therefore not support it. Just associate .ico with a program.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Sorry, Total Commander does not use this key. It's not well documented by Microsoft, and I will therefore not support it. Just associate .ico with a program.
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_intro.asp

This is not the first time I posted this link.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This article is a big mess. It's not really clear which association has priority in which cases. I also don't understand why ShellExecuteEx doesn't work with these types...
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Could you please describe which are the different cases you are talking about?
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

I am waiting....
Habemus majkam!
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

ghisler(Author) wrote:It's not really clear which association has priority in which cases.
Talking from my own experience, the priority works as folows:
1. settings under HKEY_CURRENT_USER
2. settings under HKEY_CLASSES_ROOT\.ext
3. settings under HKEY_CLASSES_ROOT\SystemFileAssociations which under circumstances that (1) or (2) exist add aditional options to the right click menu.

2icfu
HKEY_CURRENT_USER\....\Explorer\FileExts is empty and read only on my system just because of similar problems I had.
TC for Linux please!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

2icfu
HKEY_CURRENT_USER\....\Explorer\FileExts is empty and read only on my system just because of similar problems I had.
What are you waiting for then? Reassign HKCR\.ico to a working app and it will work.

The order is already documented to the fully extent in http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_perceived_types.asp?frame=true so you don't need to "guess" it.

Icfu
This account is for sale
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

Reassign HKCR\.ico to a working app and it will work.
It is already working... but not in TC
need to "guess" it.
(just a few posts up)
It's not really clear which association has priority in which cases.
TC for Linux please!
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

It is already working... but not in TC
It's probably working because of the SystemFileAssociations key which TC ignores. I have told you to reassign .ico from inside TC to a valid program, you haven't commented that so I think you haven't even tried.

There is no reason why .ico double click should not work if HKCR\.ico association is correct.

Icfu
This account is for sale
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Looks similiar to HTML to me:
The system defines several PerceivedTypes in Microsoft Windows XP. These include the following:
Image
Text
Audio
Video
Compressed
System
Though appears to be of no use to those using Win2K or prior MS-OS's.
Course if it was utilized properly, looks like it would get rid of the necessity of having a few thousand .ext settings in the registry.
Probably become more relevant in the not too distant future where what a file is will be determined by the fileHeader or possibly meta-data and not an obtuse 3 character extension.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Hi,

I found an API function which could help you to work with perceived types:
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/shlwapi/registry/assocgetperceivedtype.asp

The function seems to be as new as perceived types itself.

There are some other functions in the same category which might be helpful to escape association hell.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Interesting, thanks - but seems to require Windows XP Service Pack 2 (SP2), according to the article you sent me. And it doesn't tell me what to do with that information either.
Author of Total Commander
https://www.ghisler.com
Post Reply