...
The attribute ignorefailure[ = "true"|"false"] might be used to allow the installation to continue or abort if an error occurred during gathering the value for a certain dynamic variable.
Types of Dynamic Variable Assignments
Plain Values
The simpliest way to assign a value to a dynamic variable is a plain value.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<dynamicvariables> <variable name="previous.version" jarfile="${INSTALL_PATH}/${INSTALL_SUBPATH}/libs/config.jar" entry="release.properties" type="options" key="release.version" checkonce="false" ignorefailure="true"> <regex regexp="([0-9]+(\.[0-9]+){2})" select="\1" defaultvalue="XX.XX.XX"/> </variable> <variable name="other.stuff" zipfile="${INSTALL_PATH}/${INSTALL_SUBPATH}/libs/misc.zip" entry="app.ini" type="ini" section="Global Settings" key="AUTOSTART" checkonce="true" ignorefailure="true"> </variable> </dynamicvariables> |
...
Values from the Windows Registry
...
Dynamic variable values can be also gathered from Windows registry data.
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
<dynamicvariables>
<variable name="RegistryReadTest" checkonce="true"
regkey="HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"
regvalue="Path"/>
</dynamicvariables>
|
...
Values from the Output of a Command Execution
...
Last but not least, a dynamic variable value can be assigned from the output of an external command execution.
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
<dynamicvariables>
<variable name="hostname" checkonce="true"
executable="hostname"
type="process"/>
<variable name="result.value" checkonce="true"
executable="${INSTALL_PATH}/bin/init.sh"
type="shell"/>
</dynamicvariables> |