cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
buogr01
Level 4

Dynamically create selectable install items?

Background:
I am writing an InstallShield that needs to handle multiple install selections based on [Product] entries found in an .INI file. Moving forward the product list can be expanded, which increases the need for this to be dynamically handled. What I would like to do is read this .INI file [Product] section and populate a dialog with a selectable list of options based on the product section of the INI file. Since the products are really just variations of the same installation (configured in different ways), I'd like this to be handled by only adding entries to the INI file with no need to update/re-compile/re-build the Installshield itself. Has anyone ever done something like this or can anyone suggest a way to dynamically build this selectable list? Thank you in advance.
Labels (1)
0 Kudos
(3) Replies
Happy_Days
Level 7

It's really achieveable and I was able to do it. To start with, follow these steps:

1. Select InstallScript type of project and drag-drop your .ini file under: Support Files/Billboards -->Disk1 folder. This location can be accessed from your script with SRCDIR variable.

2. Once you have the file, use GetProfString/GetProfInt to read from the Ini file. There are lot of Ini file functions in InstallScript which you can leverage here.

3. Launch the setup using LaunchAppAndWait functions and you are done.

This does not require recompiling the media. The script should read from the ini file (you can put a loop which iterates the ini file) and execute the setup one by one. One more thing, even when your ini file changes, the setup need not be recompiled.
0 Kudos
buogr01
Level 4

Thank you for your reply. I understand how to read the INI file as well as launching particular setups, what I am really trying to figure out is how to populate a dialog with a dynamically generated list of selectable products that a user can then select and subsequently hit "Next". If I can get the dialog populated correctly, and there is way that each product in this dialog will represent its own control, or there is a method to identify which product was selected, I can then set the proper Booleans to represent what product I'm working with and continue with the correct install configuration. Any additional information out there on how to accomplish this?

Best Regards.
0 Kudos
Happy_Days
Level 7

The easiest and best bet here is to create Features on-the-fly using FeatureAddItem which will be displayed in the Feature Selection dialog box.
0 Kudos