Enter key priority over lnk format internal association settings?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Enter key priority over lnk format internal association settings?

Post by *yahuu »

I wrote a script for the relative path shortcut that calls totalcmd to open it according to its parameters, but when I configure the internal association for the lnk format and press enter, it still calls the system's default open method, which works fine via right click > open (internal association)
Is there any solution? Thank you!
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Enter key priority over lnk format internal association settings?

Post by *Stefan2 »

Perhaps show us everything what you have done?
Step-by-Step as plain text.





 
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Enter key priority over lnk format internal association settings?

Post by *yahuu »

Stefan2 wrote: 2023-02-08, 10:18 UTC Perhaps show us everything what you have done?
Step-by-Step as plain text.
The parameter format of the relative path shortcut is "Target Args", e.g. "C:\Windows\explorer.exe ..\..\aaa\bbb\"
My script uses the AHK FileGetShortcut command to get the Args, "..\..\aaa\bbb\"
Remove the "..\..\", then splice the path where the current shortcut is located to generate a new path newpath
Finally, use totalcmd.exe /O /S /L="newpath" to open the path corresponding to this shortcut in the current panel.

Set the internal association in totalcmd:
file type *.lnk,
open (&O) myexe "%1"

Right-click on the relative path shortcut file > Open (internal association) and it works fine. But pressing enter has the same effect as in Explorer and will open with Explorer
Last edited by yahuu on 2023-02-08, 13:30 UTC, edited 1 time in total.
User avatar
white
Power Member
Power Member
Posts: 4622
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Enter key priority over lnk format internal association settings?

Post by *white »

2yahuu
[Help - Internal Associations] wrote: Exe, com, bat, cmd and lnk files are treated differently than other files: The default verb cannot be overridden via internal associations.
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: Enter key priority over lnk format internal association settings?

Post by *yahuu »

white wrote: 2023-02-08, 11:03 UTC 2yahuu
[Help - Internal Associations] wrote: Exe, com, bat, cmd and lnk files are treated differently than other files: The default verb cannot be overridden via internal associations.
:( :( :(
Thank you
But was this design before because it didn't take into account relative path shortcuts,I wonder if it is possible to add support for internal association of .lnk format in subsequent versions? Or is there another solution?

It would be nice if totalcmd itself could support opening relative path shortcuts to open.
If it is a relative path shortcut to a file, it is handled by internal association as a priority, just like files.
If it is a relative path shortcut to a directory, it is opened in the current panel via totolcmd, just like a directory.
Fla$her
Power Member
Power Member
Posts: 2309
Joined: 2020-01-18, 04:03 UTC

Re: Enter key priority over lnk format internal association settings?

Post by *Fla$her »

2yahuu
Use relative symbolic links to folders/files. Why do you need shortcuts in TC?
Overquoting is evil! 👎
Post Reply