Fix/improve "No application is associated with the specified file for this operation."

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Fix/improve "No application is associated with the specified file for this operation."

Post by *mmm »

When the target path is too long, TC generates the following error message upon clicking on a file:

"Error executing program (31)"
"No application is associated with the specified file for this operation."

I find the message misleading as it implies that the root cause is an application issue rather than a long path.

Do you think you could convey a better message to the user?

Refer to:
viewtopic.php?t=76196&sid=47c599fc06d702a6f8b03e12a053bd74
Last edited by mmm on 2022-06-23, 13:37 UTC, edited 2 times in total.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Fix/improve "No application is associated with the specified file for this operation."

Post by *ghisler(Author) »

Unfortunately I cannot fix that. Error 31 is what Windows function ShellExecuteEx returns in this case. And the text shown below is loaded via FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY,...

which is a Windows function to get a text description of this error (31). There is no indication that the long path is the real reason.
Author of Total Commander
https://www.ghisler.com
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

[Rejected] Fix/improve "No application is associated with the specified file for this operation."

Post by *mmm »

Changing the title to [Rejected]
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [Rejected] Fix/improve "No application is associated with the specified file for this operation."

Post by *Dalai »

2ghisler(Author)
You could check the associated program's path length and if it's longer than MAX_PATH-1, maybe add an additional message string to give an indication about the real reason. However, I can see why you wouldn't want to waste any time on it. I'm wondering why someone would associate a filetype to a program in such a long path, and how often that occurs in reality.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Re: [Rejected] Fix/improve "No application is associated with the specified file for this operation."

Post by *mmm »

Dalai,
First off, I totally appreciate your input. Tried myself in the original request, no success.
I'm wondering why someone would associate a filetype to a program in such a long path, and how often that occurs in reality.
I think it's the other way round. It's the data that are buried deep in this planet, the associated program is installed in shallow waters.

Working on a shared drive of a global company.
20% of data paths are longer than the limit. Not surprisingly.
Sooner or later most of my fellow colleagues come across the misleading message and it takes a while for them to figure out what is going on.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [Rejected] Fix/improve "No application is associated with the specified file for this operation."

Post by *Dalai »

mmm wrote: 2022-06-23, 13:18 UTC
I'm wondering why someone would associate a filetype to a program in such a long path, and how often that occurs in reality.
I think it's the other way round. It's the data that are buried deep in this planet, the associated program is installed in shallow waters.
Isn't TC supposed to prepend the appropriate long path prefix in such a case?

Anyway, even if we assume, TC would add this prefix, it doesn't help if the associated program doesn't support long paths - which could very well be the majority of applications out there. The program would start, but won't be able to open the data file. However, this would (somewhat) shift the responsibility away from TC.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Re: Fix/improve "No application is associated with the specified file for this operation."

Post by *mmm »

The aim of this request is to improve the long-path scenario detection so that TC users who get the error message know the actual root cause and find a way to overcome the problem effectively.
With the existing error message, many users tend to re-install the application associated with the problematic file.
JOUBE
Power Member
Power Member
Posts: 1447
Joined: 2004-07-08, 08:58 UTC

Re: Fix/improve "No application is associated with the specified file for this operation."

Post by *JOUBE »

mmm wrote: 2022-06-24, 07:52 UTCWith the existing error message, many users tend to re-install the application associated with the problematic file.
How do you know that (explain that in detail!)?
talbot
New Member
New Member
Posts: 1
Joined: 2004-09-14, 08:34 UTC

Re: Fix/improve "No application is associated with the specified file for this operation."

Post by *talbot »

Hi, I have the similar problem. I can not open desired file from within TC, but I can open it in Explorer. Can I send you some logs or help you to resolve my reason of the problem?

TC shows:
Error executing program! (31)
"No application is associated with the specified file for this operation."

I try to open png image. I can open it normally via File Explorer in Windows 11.

I found the reason of the problem. I run TC as different user who doesn't have the requested file associations. May be my post will help you somehow otherwise you can ignore it.
Post Reply