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

asked 13 Sep '11, 04:05

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


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>
link

answered 13 Sep '11, 04:09

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×40
×14
×13
×2

Asked: 13 Sep '11, 04:05

Seen: 1,705 times

Last updated: 13 Sep '11, 04:09