"Associate with" fails to show filetypes with no "open" command

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
M95D
Junior Member
Junior Member
Posts: 3
Joined: 2020-10-02, 17:04 UTC

"Associate with" fails to show filetypes with no "open" command

Post by *M95D »

"Associate with..." dialog fails to show filetypes that have no "open" command defined.
To reproduce the bug, create a new file association like this:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.php]
@="PHP4"

[HKEY_CLASSES_ROOT\.php4]
@="PHP4"

[HKEY_CLASSES_ROOT\PHP4]
@="PHP4 Script"

[HKEY_CLASSES_ROOT\PHP4\Shell]
@="run"

[HKEY_CLASSES_ROOT\PHP4\Shell\edit]
@="&Edit"

[HKEY_CLASSES_ROOT\PHP4\Shell\edit\command]
@="notepad.exe \"%1\""

[HKEY_CLASSES_ROOT\PHP4\Shell\run]
@="&Run"

[HKEY_CLASSES_ROOT\PHP4\Shell\run\command]
@="php.exe \"%1\""
In the example above, PHP files have two commands: Edit and Run. Run is the default. There is no Open.
Select a .php file in Total Commander and open "Associate with...". File will appear as not associated with any program. "PHP Script" will not appear in the list.

Now add this:

Code: Select all

[HKEY_CLASSES_ROOT\PHP4\Shell\open]
@="&Open"

[HKEY_CLASSES_ROOT\PHP4\Shell\open\command]
@="notepad.exe \"%1\""
Now open again the Associate dialog. PHP files will appear associated with "PHP Script".
User avatar
petermad
Power Member
Power Member
Posts: 14743
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "Associate with" fails to show filetypes with no "open" command

Post by *petermad »

I think it is highly irregular to have a \Shell\run\command - I searched my Windows 7 Pro registry and only found one:
HKEY_CLASSES_ROOT\SDRun.AutoPlayHandler\shell\run\command

And in my Window 10 Home registry I didn't find any.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3854
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: "Associate with" fails to show filetypes with no "open" command

Post by *sqa_wizard »

I think it is highly irregular to have a \Shell\run\command
I agree.
But at least the "Edit" verb should be taken in account for association.
#5767 Personal license
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: "Associate with" fails to show filetypes with no "open" command

Post by *Horst.Epp »

sqa_wizard wrote: 2020-10-03, 10:48 UTC
I think it is highly irregular to have a \Shell\run\command
I agree.
But at least the "Edit" verb should be taken in account for association.
The Edit verb is not for opening, why should it be taken.
There is a default logic for opening end editing which is followed by TC.
So where is the need for any change here ?
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
M95D
Junior Member
Junior Member
Posts: 3
Joined: 2020-10-02, 17:04 UTC

Re: "Associate with" fails to show filetypes with no "open" command

Post by *M95D »

Run and Execute were just some examples. To me, "Open" on a script is ambiguous. English is not my native language. Maybe it's not ambiguous to you.

Yes, it is a bit unusual for a file not to have Open. On my system I found these:
- the PHP associations I created
- the Python associations I created
- .ax, .dll, .ocx (only Register and Unregister, created by a system-tweak program I use)
- .cpl => cplfile (only cplopen and runas)
- .odc => ODCFile (only Analyze and Edit)
- a few image types => PBrush (only Edit, Print and PrintTo)
- .pfx => PFXFile (only Add)
- .rnk => rnkfile (only Connect, Disconnect and Edit Connection Properties)
- a few VirtualPC HDD files => Virtual HDD (only Mount, UnMount, etc.)
- .wdp => wdpfile (only Print, PrintTo)
- AudioCD, DVD (only Play, but these are not actual files)
- Directory, Drive (only Find, but these are not files)

The problem is that file association is not listed if there is no Open command. The file might be associated with something, and start something on a doubleclick/enter, but appear as not associated.
Post Reply