Can I capture the script variables

Comments

1 comment

  • Avatar
    juanjo

    We do not have a built-in mechanism but you could write them in an ini file in the postInstallationActionList. For example, if you want to register the variables ${a} ${b} and ${c}, you could use:

    <postInstallationActionList>
        <foreach>
            <values>a b c</values>
            <variables>varname</variables>
            <actionList>
                <iniFileSet>
                    <file>${installdir}/install_options.ini</file>
                    <key>${varname}</key>
                    <section>General</section>
                    <value>${{varname}}</value>
                </iniFileSet>
            </actionList>
        </foreach>
    </postInstallationActionList>
    

    And load it in a similar way:

    <foreach>
        <values>a b c</values>
        <variables>varname</variables>
        <actionList>
            <iniFileGet>
                <file>${installdir}/install_options.ini</file>
                <key>${varname}</key>
                <section>General</section>
                <variable>${varname}</variable>
            </iniFileGet>
        </actionList>
    </foreach>
    

Please sign in to leave a comment.