Buttonbar icon with %P%S does not always work on search result

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Buttonbar icon with %P%S does not always work on search result

Post by *white »

ghisler(Author) wrote: 2025-01-06, 08:13 UTC
The asterisk doesn't work when configuring the editor in TC.
What does this have to do with parameter %S in this thread?
mikeyww reported this issue:
mikeyww wrote: 2025-01-04, 18:15 UTC For some reason, %P%S does not work when running a program that has its file properties set to run the program as administrator.
Which happens because CreateProcess is used in this case and not ShellExecuteEx, resulting in an error message that is probably not very clear for the user. The same thing happens with the editor.
ghisler(Author) wrote: 2025-01-06, 08:13 UTC Anyway, I could switch to ShellExecuteEx for the editor, but I fear that it would break a LOT of configurations because programs and parameters are passed to it in a different way than with CreateProcess.
Sorry for the confusion. I didn't mean only for the editor, but for cases where CreateProcess is used and it fails because the program has its file properties set to run the program as administrator.

Furthermore, my suggestion was not to switch to ShellExecuteEx but I wondered if it would be possible, and if it is a good idea, to try executing the program using ShellExecuteEx when CreateProcess fails in this situation, instead of showing the error.

I was trying to find a more user friendly solution. Having to add an asterisk is not a solution in all cases, and how is the user supposed to know that he needs to do that? Another solution would be to show an error message that is clearer, if that is possible.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Buttonbar icon with %P%S does not always work on search result

Post by *ghisler(Author) »

I can try this, but not everywhere because calling CreateProcess is quite different from calling ShellExecuteEx. I will have to program a solution for every location where CreateProcess is called.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Buttonbar icon with %P%S does not always work on search result

Post by *ghisler(Author) »

This should be fixed in 11.51 RC1, please test it!
Button command with multi-file parameter like %S failed when the program was set to run as administrator in the program properties. Show error if command would be longer than supported by the system
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Buttonbar icon with %P%S does not always work on search result

Post by *white »

ghisler(Author) wrote: 2025-01-17, 11:12 UTC This should be fixed in 11.51 RC1, please test it!
Button command with multi-file parameter like %S failed when the program was set to run as administrator in the program properties. Show error if command would be longer than supported by the system
Tested OK using TC 11.51rc1 32-bit and 64-bit.
Tested with a start menu entry and a button on the button bar.
Tested using the parameter %P%S, with and without surrounding quotes.
Tested with and without using surrounding quotes for the program.
Tested with 1 file selected, a few files or too many files. The error was shown when too many files were selected.
07.01.25 Fixed: F4 edit failed when the editor was set to run as administrator in the program properties (32/64)
Tested OK as long as the full path of the editor is surrounded by quotes. If no quotes are used and the path contains spaces, it fails and an error is shown saying that the file cannot be found (although the file shown on screen does exist). (I tried c:\Program Files\Notepad++\notepad++.exe)

Shift+F4 doesn't work/is not supported.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Buttonbar icon with %P%S does not always work on search result

Post by *ghisler(Author) »

Unfortunately Shift+F4 is not currently supported. As I wrote, I have to add each supported function manually. I will check whether I can support Shift+F4 too.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Buttonbar icon with %P%S does not always work on search result

Post by *ghisler(Author) »

Shift+F4 should be supported now in RC2, please test it!
17.01.25 Fixed: Create new text file (Shift+F4): Opening the editor failed when the editor was set to run as administrator in the program properties (32/64)
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5744
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Buttonbar icon with %P%S does not always work on search result

Post by *white »

ghisler(Author) wrote: 2025-01-22, 11:28 UTC Shift+F4 should be supported now in RC2, please test it!
17.01.25 Fixed: Create new text file (Shift+F4): Opening the editor failed when the editor was set to run as administrator in the program properties (32/64)
Tested OK using TC 11.51rc2 32-bit and 64-bit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Buttonbar icon with %P%S does not always work on search result

Post by *ghisler(Author) »

Thanks!

Moderator message from: ghisler(Author) » 2025-01-22, 15:14 UTC

Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
Post Reply