A question regarding MSI (Macro Substitution and Include) tool:
Is there a way to set the value of a macro in the substitutions file for later use without triggering an immediate substitution?
For example, say I have a template file xxx.template:
$(FNAME) $(LNAME) is a $(SEX)
and my substitutions file xxx.substitutions:
file xxx.template {
pattern {FNAME, LNAME, SEX}
{John, Smith, Male}
{George, Jones, Male}
{James, Taylor, Male}
{Robert, Redford, Male}
{Larry, Cableguy, Male}
{Susan, Williams, Female}
{Judy, Johnson, Female}
{Melinda, Martin, Female}
{Cathy, Lewis, Female}
{Linda, Hall, Female}
}
and the output after running "msi -S xxx.substitutions"
John Smith is a Male
George Jones is a Male
James Taylor is a Male
Robert Redford is a Male
Larry Cableguy is a Male
Susan Williams is a Female
Judy Johnson is a Female
Melinda Martin is a Female
Cathy Lewis is a Female
Linda Hall is a Female
What I'd like to do is avoid typing "Male" and "Female" so often (perhaps I have hundreds and hundreds of substitutions to do) by having a substitutions file something like this:
file xxx.template {
Set SEX=Male
pattern {FNAME, LNAME}
{John, Smith}
{George, Jones}
{James, Taylor}
{Robert, Redford}
{Larry, Cableguy}
Set SEX=Female
{Susan, Williams}
{Judy, Johnson}
{Melinda, Martin}
{Cathy, Lewis}
{Linda, Hall}
}
Any tips for doing something like this with the existing tool?