Question

How do I direct the installer to perform actions after showing a page?

How do I direct the installer to perform actions after showing a page?

Answer:

You can direct the installer to perform actions after a page is shown by using a <postShowPageActionList> section. The following example sets the value of a registry key with the value specified by the user if the installer is running on Windows, and keeps the same information in an environment variable if the installer is running on Linux.

<fileParameter>
    <name>confirmation</name>
    <value>${mypath}</value>
    <title>Server File Confirmation</title>
    <description>Server file</description>
    <explanation>Please confirm the information showed below  or introduce
a new value</explanation>
    <default></default>
    <ask>yes</ask>
    <mustBeWritable>yes</mustBeWritable>
    <postShowPageActionList>
      <registrySet>
     <value>${mypath}</value>
         <key>HKEY_LOCAL_MACHINE\SOFTWARE</key>
         <name>MYAPP</name>
        <ruleList>
          <compareText>
           <text>${platform_name}</text>
           <logic>equals</logic>
           <value>windows</value>
          </compareText>
        </ruleList>
     </registrySet>
     <setInstallerVariable>
       <name>mypath</name>
       <value>${mypath}</value>
        <ruleList>
          <compareText>
           <text>${platform_name}</text>
           <logic>equals</logic>
           <value>linux</value>
          </compareText>
        </ruleList>
      </setInstallerVariable>
    </postShowPageActionList>
 </fileParameter>