Can I add a parameter page between the installation of two components?

Comments

2 comments

  • Avatar
    DevHopeful_2012

    I don't think that you can do this, unless you split your two components into separate installers.

    Basically, the component B installer could be called in the postInstallationActionList of the component A installer, using a runProgram action. Then, the component B installer could prompt for the location of the zip file or insert the 2nd DVD, using component B's parameters. Would that work for you?

    Otherwise, all components need to prompt for their parameters before installation. Do you really have to wait for component A to be installed? Or, do you just require that component A is selected, as well? If the latter is true, then just use a componentSelectionValidationActionList.

  • Avatar
    wojciechka

    You can use actions after component A to show a dialog. However, showing a directoryParameter dialog is not possible. Usually users expect to enter all the information before installation starts - not during the installation. So unless you explicitly need to show it during installation, it is recommended to show it as part of parameters.

    What you can do is what DevHopeful_2012 has recommended - create another installer to show the prompt dialog. You can modify the welcome text of the second installer to explain what is needed and then show a directoryParameter that stores the chosen location in a file:

    <parameterList> <!-- use installdir to pass the original installation directory only --> <directoryParameter> <name>installdir</name> <ask>0</ask> <cliOptionName>prefix</cliOptionName> </directoryParameter> <!-- ask for directory --> <directoryParameter> <name>location</name> <description>Specify location</description> <explanation></explanation> <value></value> <default></default> <allowEmptyValue>0</allowEmptyValue> <mustBeWritable>0</mustBeWritable> <mustExist>0</mustExist> <width>40</width> <validationActionList> <!-- check if file.zip exists in specified directory --> <throwError> <text>Location does not contain file.zip</text> <ruleList> <fileTest> <condition>does_not_exist</condition> <path>${location}/file.zip</path> </fileTest> </ruleList> </throwError> <-- if file.zip exists, write .ini file with chosen location and exit --> <iniFileSet> <file>${installdir}/location.ini</file> <key>location</key> <section>location</section> <value>${location}</value> </iniFileSet> <exit/> </validationActionList> </directoryParameter> </parameterList>

    You can then invoke the second installer with --prefix "${installdir}" from the first one in last folder for component A:

    <component> <name>a</name> <description>Component A</description> <canBeEdited>1</canBeEdited> <selected>1</selected> <show>1</show> <folderList> <folder> <description>Last folder</description> <destination>${installdir}</destination> <name>last</name> <platforms>all</platforms> <actionList> <runProgram> <program>${installdir}/dirchooser.exe</program> <programArguments>--prefix "${installdir}"</programArguments> </runProgram> </actionList> </folder> </folderList> </component>

    Also, if your installer is running from a DVD, changing the DVD may crash the installer on some platforms, especially Windows.

Please sign in to leave a comment.