How to make a installation package that contain several product - Advanced Installer Community
ctw_lty
Posts: 13
Joined: Mon Apr 17, 2017 9:40 am

How to make a installation package that contain several product

hello, I meet a requirement in my recent work. I have several product which shared some feature.therefore,I would like to combine them into one installation package to cut down the space. and maybe it would use a dialog like the setuptTypeDlg to choose which product to be installed. Beside, when the installation package was ran again after the package was installed, It would not decide to uninstall immediately, rather than, It would decide to uninstall or install a product according to the product chosen by user is installed or not.
It's like using a installation package to manage several packages sharing some features. what should I do to realize this
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: How to make a installation package that contain several product

Hello,
I have several product which shared some feature.therefore,I would like to combine them into one installation package
This can be done by creating a package that contains multiple features. Please take a look on our article: Organization Page
To create features, you should go to "Organisation" page and click "New Feature" toolbar button. Then you should organize the components by drag and droping them to the corresponding features. The common resources components could be placed in the MainFeature.

After that, you should go to dialogs page, click "Add Dialog" toolbar button and select "setupTypeDlg" or "OptionalFeatsDlg". This dialog should be placed after WellcomeDlg in the dialogs chain. By this dialog the user will select the features he want to install.
Beside, when the installation package was ran again after the package was installed, It would not decide to uninstall immediately, rather than, It would decide to uninstall or install a product according to the product chosen by user is installed or not.
The standard Windows Installer behaviour when launching a package that is already installed is to trigger Maintenance mode. This mode gives the user the option to Modify, Repair or Remove the package. If he chooses to modify it, the feature list will be displayed, giving him the option to install/uninstall features.
You can also customize the Maintenance Dialog chain in "Dialogs" page.

If you want to trigger the Maintenance mode from Control Panel as well, you should go to "Product Details", select "Override Windows Installer program list entry" and "Use a single "Uninstall/Change" button instead of separate buttons for each operation"

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ctw_lty
Posts: 13
Joined: Mon Apr 17, 2017 9:40 am

Re: How to make a installation package that contain several product

There is some different between the package you mentioned form that I want to realize. The following is some screenshot about what I have done

(1)there are several options for user to choose the product to install
4.png
4.png (36.56 KiB) Viewed 3736 times
(2)if the first options was chosen, then the following dialog would be show
[img]2.png[/img]

(3)as (2), if third option was chosen, dialog would show as following
1.png
1.png (30.22 KiB) Viewed 3736 times
(4)when I run the package after the option 3 was installed, it show the maintain dialog. And if I choose the modify, It would show the following dialog
x3.png
x3.png (32.98 KiB) Viewed 3736 times
the quick selection tree in the modify dialog is the same as the tree of the option I choose when installing the package.but not organized by the options.

when making the package I have several problem
(1)In the first step above before, how can I extend the setup type dialog so that the package can deal with more options.

(2)In the second or third step above, how can I hide the feature not being selected so that the user can not see them. I was using the vbscript to decide features to be installed when different options was selected.Could this be achieved by vbscript or should be in other way

(3)When running the package again after installing one option, could the maintain dialog :delete,modify,repair show decided by whether the option chosen by the user is installed or not.

(4)and If the (3) can be achieve, can different option choose to install to different path, because we can see from the [img]x1.png[/img] or[img]x3.png[/img],there is no place to choose the path to install the option.

(5)and if different option or product in the package can be install to different path, could it be delete when uninstalling the package

It is a little bit more, thank very much for deal the problem.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: How to make a installation package that contain several product

Hello,
(1)In the first step above before, how can I extend the setup type dialog so that the package can deal with more options.
I wouldn't recommend modifying the predefined "SetupTypeDlg" in this way. Instead you could create a new selection custom dialog that fits your needs. You should also create a custom dialog for each feature, on which the user will be prompted to select which sub features he wants to install. You could use three or more "Image Button" controls on the selection dialog, depending on the number of your features and set for each one a "Display a specific dialog" publish event that displays the corresponding dialog.
In the second or third step above, how can I hide the feature not being selected so that the user can not see them.
I'm afraid this is not possible. The only way a feature could be hidden from this list is by going in "Organisation" page, and selecting "Not displayed" option in feature tree.
Instead, you should create your a custom dialog for each feature. On this dialogs you could, for example, use checkboxes to allow the user to choose what sub-features he wants to install.
(3)When running the package again after installing one option, could the maintain dialog :delete,modify,repair show decided by whether the option chosen by the user is installed or not.
When running a package that is already installed the maintenance mode will be triggered. If the user chooses to modify the installation, CustomizeDlg dialog will be show. This dialog will display a list with the existing state of the features.
(4)and If the (3) can be achieve, can different option choose to install to different path, because we can see from the [img]x1.png[/img] or[img]x3.png[/img],there is no place to choose the path to install the option
All the features will be installed in APPDIR, as it is shown in the "Organisation" page

Hope this helps.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”