Internal command line not launching the expected binary
Moderators: white, Hacker, petermad, Stefan2
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, I could do this, but it could cause other problems, e.g. when the path contains spaces and the name alone doesn't. Maybe as an option.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
support++ for an option.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
I also support an option. For me this lauching the exe from the path mentioned next to the cmd-line is a key feature (even the exe is registred as an app).
I found an interesting sequence in MSDN:
Could the parameter "lpDirectory" from SHELLEXECUTEINFO structure in ShellExecuteEx function have an influence
I found an interesting sequence in MSDN:
So the registry should come last only....Finding an Application Executable
When the ShellExecuteEx function is called with the name of an executable file in its lpFile parameter, there are several places where the function looks for the file. We recommend registering your application in the App Paths registry subkey. Doing so avoids the need for applications to modify the system PATH environment variable.
The file is sought in the following locations:
The current working directory.
The Windows directory only (no subdirectories are searched).
The Windows\System32 directory.
Directories listed in the PATH environment variable.
Recommended: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
Could the parameter "lpDirectory" from SHELLEXECUTEINFO structure in ShellExecuteEx function have an influence
lpDirectory
Optional. The address of a null-terminated string that specifies the name of the working directory. If this member is NULL, the current directory is used as the working directory.
This has been clarified already:aekeller wrote:Could the parameter "lpDirectory" from SHELLEXECUTEINFO structure in ShellExecuteEx function have an influence
lpDirectory
Optional. The address of a null-terminated string that specifies the name of the working directory. If this member is NULL, the current directory is used as the working directory.
Dalai wrote:However, I'm wondering whether or not TC correctly fills the data structure passed to that function, in particular the (current) directory.
Regardsghisler(Author) wrote:Yes, TC does fill the current directory.
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Sorry, I did not properly read it.... Still wondering why the function is not doing it according the documentation...Dalai wrote:This has been clarified already:Dalai wrote:However, I'm wondering whether or not TC correctly fills the data structure passed to that function, in particular the (current) directory.ghisler(Author) wrote:Yes, TC does fill the current directory.
2aekeller
Well, Microsoft and documentation is some story, isn't it? Maybe it was like they documented in the past, maybe they changed the behavior, who knows.
Regards
Dalai
Well, Microsoft and documentation is some story, isn't it? Maybe it was like they documented in the past, maybe they changed the behavior, who knows.
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror