Multi Commander Support Forum

Multi Commander => Support and Feedback => Topic started by: total_annihilation00 on May 22, 2025, 01:38:39

Title: Aliases Launched Exe's Get Current Tab As Startup Folder Not Origin Root Folder
Post by: total_annihilation00 on May 22, 2025, 01:38:39
Issue Description:
When launching applications via Aliases, the active tab's path (representing the current working directory) is being assigned as the configuration or log file storage location instead of the application's actual startup directory. Specifically, the application’s startup folder, as defined in the executable’s properties (the "Startup Folder" in the Exe Properties), is not being used as the working directory upon launch.

Details:
Code: [Select]
!"D:\Download\cpp-projekt\FuzenOp_SiloTest\Release\Yahoo-8Ball-Pool-Clone.exe"
results in the current tab being D:\Download\AutoHotkey\Compiler\, and the application writes its config/log files into this directory instead of its intended startup directory (in my case the "Pool-Settings.txt" config file was placed in here erroneously).

Summary:
The launch mechanism via Aliases incorrectly assigns the current working directory (the open tab) as the application's working directory, instead of using the executable's designated startup folder. This behavior constitutes a bug in how the environment initializes the app's working context upon launch.
Title: Re: Aliases Launched Exe's Get Current Tab As Startup Folder Not Origin Root Folder
Post by: Mathias (Author) on May 22, 2025, 08:36:05
Not a bug, but a feature. :)

Example. I assign alias "n" to "Notepad2.exe" then I can do "n newfile.txt" and I get the new file in the current folder.

Not sure if both situation can work.. Maybe create a shortcut for the .exe that needs its working dir and execute that via alias
Title: Re: Aliases Launched Exe's Get Current Tab As Startup Folder Not Origin Root Folder
Post by: total_annihilation00 on May 22, 2025, 08:45:29
Oh I see, well I feared it would come to that —I'll link to a shortcut then.  ;D

P.S: Wait, will making a User Defined Command to hotlink the file work ? Nvm, I'll stick to using a shortlink .LNK. User Defined Commands > Custom Commands > Run; seems to do the trick !
Title: Re: Aliases Launched Exe's Get Current Tab As Startup Folder Not Origin Root Folder
Post by: Mathias (Author) on May 22, 2025, 09:01:48
Oh I see, well I feared it would come to that —I'll link to a shortcut then.  ;D

P.S: Wait, will making a User Defined Command to hotlink the file work ? Nvm, I'll stick to using a shortlink .LNK.

You can also create a UserDefinedCommand that start it, and then call the UDC from alias using ID of the script. .Just out a @ in front of the id
Like  @6d35f84f73a74dfbb16ca370ccb625f7

Maybe can add so a special character first of the command tells it to use the command paths as working folder.. like maybe "$" instead of "!", I check if that possible
Title: Re: Aliases Launched Exe's Get Current Tab As Startup Folder Not Origin Root Folder
Post by: total_annihilation00 on May 22, 2025, 09:04:42
Yeah, I'am way ahead of ya… 😂
Title: Re: Aliases Launched Exe's Get Current Tab As Startup Folder Not Origin Root Folder
Post by: total_annihilation00 on May 22, 2025, 09:21:38
Maybe can add so a special character first of the command tells it to use the command paths as working folder.. like maybe "$" instead of "!", I check if that possible

Wow that's a brilliant idea, you should definitely do that —would save a lot of hassle (of porting them to User-Defined Commands) !