How do I direct the installer to perform actions before installation starts?

Answered

Comments

1 comment

  • Avatar
    Jake

    You can direct the installer to perform actions before installation starts by using the <preInstallationActionList> section. For example, the following code will set a different installation directory depending on the platform the installer is running on.

    <preInstallationActionList>
      <setInstallerVariable>
        <name>installdir</name>
        <value>${env(SYSTEMDRIVE)}/${product_shortname}</value>
        <ruleList>
          <compareText>
           <text>${platform_name}</text>
           <logic>equals</logic>
           <value>windows</value>
          </compareText>
        </ruleList>
      </setInstallerVariable>
      <setInstallerVariable>
        <name>installdir</name>
        <value>/usr/local/${product_shortname}</value>
        <ruleList>
          <compareText>
           <text>${platform_name}</text>
           <logic>equals</logic>
           <value>linux</value>
          </compareText>
        </ruleList>
      </setInstallerVariable>
    </preInstallationActionList>
    

Please sign in to leave a comment.