Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD Possible Bug With OPTION Command With @FILE

Jun
539
3
I have observed something that does not seem right to me with the variable %_inimane. With my original TCSTART file, the variable would have the following value:

Code:
C:\ProgramData\JP Software\Take Command 27\TCMD.INI

When I add the command

Code:
option @c:\tcmd\Mail_Settings.cfg

the value of %_ininame changes to that file. Now I discovered that the same things happens as well when I run the option command from the command line.

This is not behavior that I would expect, and I don't think that it is documented. I also don't think it makes sense, since the INI file is actually still the same, and any changes I make using the OPTIONS tab in TCMD are written to TCMD.INI.

As a work-around, I have removed the "option @file" command and replaced it with a string of commands of the form "option //parameter=value", one for each line in the CFG file.
 
I just do a:
Code:
for %data in @mail_settings.cfg do option //data

does

Makefile:
option @mail_settings.cfg

work?
 
Not quite. The command would have to be for %data in (@Mail_Settings.cfg) do option //%data. Even that would need some tweaking, since one of the lines is mailaddress=Jay Sage <jay@...>, so one would have to turn off redirection. In addition, the file has some lines like "[4NT]" that don't have corresponding option commands (though I think those lines are not necessary and could be removed from the file.

The whole thing added only five lines to TCSTART. The real issue is that running option @file changes the value of %_ininame to "file", which it should not, since the operatve ini file is still tcmd.ini.
 
Since it's a temporary options change (as mentioned in the help) I'm thinking that's how you know they're not necessarily coming from the INI file.
 
WAD, not a bug. It's behaved this way for 20+ years.

TCC does this so that if you've defined a new configuration file (which is definitely what you're doing with the "option @filename" syntax) the filename will be passed on to subsequent secondary shells so they can inherit it.
 
Oh, that's very important to know. I definitely did not want those settings to be inherited! They were changes to the email settings to use a different mail server, and I intended them to apply only to that TCC task. So it's doubly good that I replaced that command with the individual option setting commands (following the suggestion from Charles G). Or are even those changes inherited by new TCC tasks?

It might be a good idea to include these details in the help file. Actually, I just looked, and the help file says, rather misleadingly, "Temporarily changing a list of options:", much like the description of the "OPTION //directive=value" version of the command.
 

Similar threads

D
Replies
0
Views
2K
drrob1
D
Back
Top