[8.51a] Internal associations for EXE doesn't work

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

[8.51a] Internal associations for EXE doesn't work

Post by *MVV »

I try to add an internal association for *.exe (actually I've tried it for *.danger.exe) in order to forbid accidental execution.

Unfortunately it doesn't work: TC doesn't show icon for that internal association and still executes it on Enter.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is intentional. Internal associations can match files in various ways, e.g. by date/time, size, various wildcards etc. Ignoring EXE should prevent the user from accidentally preventing the launch of all program files. You also can't modify the Windows association of .EXE for a similar reason.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think user should blame himself in such cases...
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2MVV
Just rename "*.danger.exe" > "*.danger.exe!" :)
tonifelfe
Junior Member
Junior Member
Posts: 22
Joined: 2007-01-26, 07:57 UTC

Post by *tonifelfe »

the wrong tool in wrong hands...
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ts4242,
I would rename it to BIN but I need to have it as EXE. Internal associations is a nice way to restrict execution of some files in special locations (e.g. project files in backup folders to prevent creation of temporary files).
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

MVV wrote:Internal associations is a nice way to restrict execution of some files in special locations (e.g. project files in backup folders to prevent creation of temporary files).
I think ignore list is better for this purpose.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ts4242,
I still need to work with these files (just don't start them accidentally), so ignore list is not a solution. Currently I've made a subfolder with restricted execute permissions and a symlink in my working folder, but symlinks for files are disgusting (size 0 bytes and modification time always equals to symlink creation time). So TC internal association with noticeable icon and safe execute action would be just perfect.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1050
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Just create an alternative executable extension in Windows.

Copy the stuff from HK_CLASSES_ROOT\.exe like so:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.exxe]
@="exefile"
"Content Type"="application/x-msdownload"

[HKEY_CLASSES_ROOT\.exxe\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"
Now your .exxe files act like regular .exe and they are not filtered by TC.

And Mr. Ghisler is only partially right: You can modify the way Windows handles .exe files. Just did it a few days ago by accident ;) Just rename the .exe or exefile entry.
You can't off course use the "Open with..." stuff.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I said, I really need EXE extension for these files, I can't rename them. So overriding internal association is the only way to solve my problem.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, not going to happen. Let me explain again why:
For example, you define an association "files younger than 1 minute". If this would be applied also to EXE files, you could no longer open any programs!

However, when you open the context menu, you actually can open the file with the first menu item "Open (Internal)".

If you have to work with live viruses, you can set
RestrictInterface=128
to disable opening anything via ENTER. Use Alt+F3 (external viewer) for safe opening via associations.
Author of Total Commander
https://www.ghisler.com
Post Reply