what a handy function!
think about XMind(http://www.xmind.net/download/portable/). If I use xmind.exe directly, it will refused to run because the main program use a portable .ini to find some directories it used. In that .ini, something just like this :
-startup
../Commons/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
when the TC open the main program, it find direct based on the CURRENT dir, so it can't find the correct ones.
If internal association can let me use the command I defined in usercmd.ini, so I can specify the STARTUP dir for it.
why internal association can't use user defined command?
Moderators: Hacker, petermad, Stefan2, white
You could put a Start_Exe.cmd next to the Exe:
This will change the working dir to the .cmd file.
Then use it with your Open command.
In wincmd.ini:
Filter1_open=C:\Programs\Xmind\Start_Exe.cmd "%1"
Code: Select all
cd /d %~dp0
start "" xmind.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
Then use it with your Open command.
In wincmd.ini:
Filter1_open=C:\Programs\Xmind\Start_Exe.cmd "%1"
Re: why internal association can't use user defined command?
Create a shortcut for your program (with start folder) and use the shortcut instead of the .exe file in the internal association.cheming wrote:when the TC open the main program, it find direct based on the CURRENT dir, so it can't find the correct ones.
If internal association can let me use the command I defined in usercmd.ini, so I can specify the STARTUP dir for it.
Note: if you use the browse button to select your shortcut file then the shortcut file may be resolved to the .exe file. To prevent this, don't use the browse button but enter the path to the shortcut manually, or open the browse dialog and enter "*.lnk" in the file name field (not file type field!) and hit enter and then select your shortcut file (works on my computer running Windows XP).
You can execute cm- or em-commands using tools like TCFS2 or TCMC. E.g. using TCFS2:
Don't forget that your em-command should pass focused file (or selection) to program to be launched.
Code: Select all
TCFS2.exe /ef "tem(em_CdDocuments)"