Page 1 of 1

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

Posted: 2022-06-23, 06:17 UTC
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

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

Posted: 2022-06-23, 08:13 UTC
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.

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

Posted: 2022-06-23, 08:40 UTC
by mmm
Changing the title to [Rejected]

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

Posted: 2022-06-23, 13:03 UTC
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

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

Posted: 2022-06-23, 13:18 UTC
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.

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

Posted: 2022-06-23, 13:49 UTC
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

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

Posted: 2022-06-24, 07:52 UTC
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.

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

Posted: 2022-06-30, 22:09 UTC
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!)?

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

Posted: 2023-08-07, 14:50 UTC
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.