Renaming of Features at runtime
Posted: Wed Jun 28, 2006 8:48 am
Is it possible to change the name of the feature at runtime or at compile time?
I tried using variables, and at first it seemd that it worked. I defined two variables, $GROUP1$ and $GROUP2$. The components/features were defined in the script as:
Define Component: $GROUP1$
Define Component: $GROUP1$\\Program files
Define Component: $GROUP1$\\Samples
Define Component: $GROUP1$\\Help files
Define Component: $GROUP2$
Define Component: $GROUP2$\\Program files
Define Component: $GROUP2$\\Samples
Define Component: $GROUP2$\\Help files
By setting GROUP1 and GROUP2 variables at the beginning of the script, everything seemd to work - the list of components was properly displayed, etc.
But the command
Get Component $GROUP1$ Selection State into Variable SELECTED
did not work. If i changed the $GROUP1$ with the actual variable name, then it returned the correct value and correct files were installed, defined in the code block checking the SELECTED variable.
Is this a bug in "Get Component Selection State" command, or variables can not be used that way?
If variables can not be used, what is alternative to make the Component names configurable? It does not need to be configurable at runtime, but I would like to have one script that handles multiple product installations, that differ only in the product name. The install procedure is identical otherwise.
I tried using variables, and at first it seemd that it worked. I defined two variables, $GROUP1$ and $GROUP2$. The components/features were defined in the script as:
Define Component: $GROUP1$
Define Component: $GROUP1$\\Program files
Define Component: $GROUP1$\\Samples
Define Component: $GROUP1$\\Help files
Define Component: $GROUP2$
Define Component: $GROUP2$\\Program files
Define Component: $GROUP2$\\Samples
Define Component: $GROUP2$\\Help files
By setting GROUP1 and GROUP2 variables at the beginning of the script, everything seemd to work - the list of components was properly displayed, etc.
But the command
Get Component $GROUP1$ Selection State into Variable SELECTED
did not work. If i changed the $GROUP1$ with the actual variable name, then it returned the correct value and correct files were installed, defined in the code block checking the SELECTED variable.
Is this a bug in "Get Component Selection State" command, or variables can not be used that way?
If variables can not be used, what is alternative to make the Component names configurable? It does not need to be configurable at runtime, but I would like to have one script that handles multiple product installations, that differ only in the product name. The install procedure is identical otherwise.