Say I have two components A and B. Files of A is included in the the installer, B is to unzip a zip file. Before installing B but after installing A I'd like to prompt the user to specify the location of the zip file. It could be in a different directory or on a different DVD. So I'd like to prompt a "directory" parameter with the following message: "Either put in the 2nd DVD or point to where the zip files are located" the user then can change it to a different directory or simply swap the dvd to continue. Can I do that? Thanks,

asked 09 Jun '12, 19:52

gt8967884's gravatar image

accept rate: 12%

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.


answered 10 Jun '12, 15:51

DevHopeful_2012's gravatar image

accept rate: 9%

How about creating three components? Your component B becomes component C. Then, the new middle component B only has your parameters that prompt the user to specify the location of the zip file.

(11 Jun '12, 02:00) tahoar

It will still prompt for the parameters of all 3 components prior to "installation". gt8967884 is asking how to prompt for the parameters after the first component is installed. I don't know of a way to do that. I just have the workaround suggested here.

(11 Jun '12, 02:03) DevHopeful_2012

That's right, I tried to add a parameter page in the component, but it still shows before the installation. Thanks for the suggestions.

(11 Jun '12, 21:28) gt8967884

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 exists in specified directory --> <throwError> <text>Location does not contain</text> <ruleList> <fileTest> <condition>does_not_exist</condition> <path>${location}/</path> </fileTest> </ruleList> </throwError> <-- if 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.


answered 11 Jun '12, 03:49

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Yes, I need to swap back the 1st DVD to be able to finish the installation, otherwise, it errors out during creating the uninstaller. An interesting finding is if I copy the main installer to the 2nd DVD, after I swap to the 2nd one, I don't need to swap back to the 1st one to finish the installation.

I'll create a separate installer for the 2nd DVD. Thanks for the suggestions.

(11 Jun '12, 21:26) gt8967884
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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



Asked: 09 Jun '12, 19:52

Seen: 1,848 times

Last updated: 11 Jun '12, 21:28