Controlling Build Options like "Build All" via Env Variable

We have an automated TFS build that launches FB to compile a bunch of Delphi projects. The build generally works great. There is one flag in each Delphi project of the FB project, however, that I would like to dynamically adjust depending on which build is invoked from TFS, and that is “Build All”. Sometimes I want this checked, and other times I don’t.

We pass paths and strings from TFS to FB without any trouble, and then leverage those variables within various action properties, such as the output directory (e.g. %DropShare% is expanded). Is there a way to control any of the checkbox settings, like “Build All” or “Regenerate Resource”? Is the only option to write a script that invokes the FB build from TFS, and set the property via the script? 

Thanks for any suggestions. This is on FB7, by the way.

How about passing a variable to FB and have 2 Delphi actions defined, one with and one without the Build All checkbox, then a conditional based on the variable passed in?

Might be another way, but the above should work.

Thanks! Reasonable suggestion, and I appreciate the reply!

I am trying to avoid having duplicate actions if possible, because there is a fair amount of metadata associated with each, and if we change one we have to remember to change the other. At least the suggestion keeps the actions all in the same project, which I like. Beats having two separate projects. 

Will definitely consider this, but would love to hear more ideas as well. 

Wondering if anyone else has any reasonable suggestions?