- Mar
- 75
- 1
I recently had reason to be invoking TCC thusly:
cmd.exe /C "whatever.btm param1 param2"
. (The why is strange and a pain to get around.)
This almost worked, except the parameters to whatever.btm were stripped off. I traced this to how the registry is setup under the association for .btm files, which ends up invoking TCC with a single parameter, the .btm batch file, expressed as [TCC .exe path] "%1" in the btm_auto_file/shell/Read/command anonymous key value.
Taking a look at how .cmd files are run, under cmdfile/shell/open/command, I see "%1" %*, without any mention of cmd.exe, so it appears that the idea of passing parameters in an invocation using the file association mechanism is not some quirky thing I've invented.
Overlooking that this seems to not specify that cmd.exe should execute to interpret a .cmd file, I would like to know if there is a good reason for TCC's setup to not get all the parameters passed to TCC when a .btm is "opened" from a non-TCC program. And more to my immediate problem, how should this be done to make it robust? (or as robust as the OS or its shells permit)
Thanks in advance.
cmd.exe /C "whatever.btm param1 param2"
. (The why is strange and a pain to get around.)
This almost worked, except the parameters to whatever.btm were stripped off. I traced this to how the registry is setup under the association for .btm files, which ends up invoking TCC with a single parameter, the .btm batch file, expressed as [TCC .exe path] "%1" in the btm_auto_file/shell/Read/command anonymous key value.
Taking a look at how .cmd files are run, under cmdfile/shell/open/command, I see "%1" %*, without any mention of cmd.exe, so it appears that the idea of passing parameters in an invocation using the file association mechanism is not some quirky thing I've invented.
Overlooking that this seems to not specify that cmd.exe should execute to interpret a .cmd file, I would like to know if there is a good reason for TCC's setup to not get all the parameters passed to TCC when a .btm is "opened" from a non-TCC program. And more to my immediate problem, how should this be done to make it robust? (or as robust as the OS or its shells permit)
Thanks in advance.