cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Have a Response File's Default Variable Values not Overwritten During Install

How to Have a Response File's Default Variable Values not Overwritten During Install

Summary

How to have default variable values set by a response file and avoid it from getting overwritten by runtime actions

Synopsis

How to have default variable values set by a response file and avoid it from getting overwritten by runtime actions.

Discussion

Response files, which are installer properties files, can be used to set the default values of variables for an installer. However, if the installer executes an action that sets the same variable, the value set by the response file will get overwritten. To prevent the default values set by the response file from getting overwritten, you will need to apply rules to the action(s) that re-set the variable. An example of a rule that accomplishes this goal is below:

If a "Set InstallAnywhere Variable" action is used in your project to initialize variable $TEST_VAR$, but you want the response file to set this default value instead, you can add a "Compare InstallAnywhere Variables" rule to the "Set InstallAnywhere Variable" action. Set the rule to have the action execute only if the variable has not yet been set to anything. You can set the operator to "equals" and Operand 2 to a blank value. The result is that if a response file does not set the variable to any value, then the "Set InstallAnywhere Variable" action will execute and initialize the variable. If the response file does set the variable, then the "Set InstallAnywhere Variable" action will be ignored, and the default value will not be overwritten during runtime.

Additional Information

Response Files
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 09, 2018 08:15 PM
Updated by: