sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Typical/Custom/complete

I'm trying to determine different setups.

All features are msi's that will be installed using a bat file upon completion of the 'overall' installer.

Setup 1.. Typical - install the most commonly installed feature.
Setup 2.. Custom - feature in setup 1 is NOT auto selected and user must deselect, but use can select whatever they wish.
Setup 3.. Complete - Install all.

I thought this would be quick and easy to do, but it's solution seems elusive to me.

I've try different things from the forums, but can't get it to do what I want.

I have the following condition on all of my features in 'Chained Packages' Dialog - ((&FEATURE = 3) AND NOT (!FEATURE = 3)).

And I use the following to 'send' the path for a selected msi to the vbs function that creates the bat file - "[#MSI_NAME.msi]".

The bat file is created as a 'Commit' custom action.

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Typical/Custom/complete

Hello,
All features are msi's that will be installed using a bat file upon completion of the 'overall' installer.
Please note that the recommended way of doing what you require is using Chained Packages.
Also make sure that you create a Feature on the Organization page for each of your MSIs, then use the proper Feature Identifiers in the Chained Packages' install conditions. This way, each chained package will be conditioned by a different feature.
In essence you will have these conditions on the Chained Packages page:

Code: Select all

(&MainFeature = 3) AND NOT (!MainFeature = 3)    for your first installer
(&Feature2 = 3) AND NOT (!Feature2 = 3)          for your second installer
(&Feature3 = 3) AND NOT (!Feature3 = 3)          for your third installer
assuming of course MainFeature, Feature2, Feature3 etc. are the Feature Identifiers that have been set for your features on the Organization page.
In case this suggestion does not work for you, please send your project file to support at advancedinstaller dot com so we can further analyze your problem.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Re: Typical/Custom/complete

I know the 'prefered' method of multi-install, but I need to use other, pre-written, msi's.
the 'overall' installer just selects which one(s) to install on this machine.

MSI_NAME.msi is an msi file that will be installed onto the machine if selected (or is the typical installation, or complete is clicked), and is the only file in it's feature.

I want to know what condition to set on the features in the chained packages page so the [#MSI_NAME.msi] will contain the full path of the msi (and the msi file will be installed to the machine, obviously) for the following two scenarios:
1.. a feature that should be installed as Typical, Complete, or if selected on the Custom dialog (but should NOT be auto-selected).
2.. a feature that should be installed as Complete, or if selected on the Custom dialog (but should NOT be auto-selected).

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Typical/Custom/complete

Hi,
I know the 'prefered' method of multi-install, but I need to use other, pre-written, msi's.
Please note that the chained packages feature uses only existing MSI packages. So it would be a good approach for what you want to do.
I want to know what condition to set on the features in the chained packages page so the [#MSI_NAME.msi] will contain the full path of the msi (and the msi file will be installed to the machine, obviously) for the following two scenarios:
1.. a feature that should be installed as Typical, Complete, or if selected on the Custom dialog (but should NOT be auto-selected).
2.. a feature that should be installed as Complete, or if selected on the Custom dialog (but should NOT be auto-selected).
You can set when the feature is installed by using the Feature Properties pane. For example, the "Installed by default" option means that the feature will be installed by the "Typical" option.

I'm not quite sure what you need to do with the features. Can you please give me more details about this (and eventually an example)?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Re: Typical/Custom/complete

Ok

I have 4 features. Each contains just 1 msi.
Feat1
Feat2
Feat3
Feat4

In most circumstances only 1 feature (possibly 2) would be installed on a particular machine, although none of them exclude any of the others. That us just how the system is to be set up in most circumstances.

Typical = Install Feat3
Complete = Install Feat1, Feat2, Feat3, Feat4
Custom = Install whatever combo is selected
NB: on Custom - Feat3 (Typical installation) is NOT to be AUTO-selected as this would not be intuitive in my instance. It is my understanding that this would be the case if a feature is set to Install by default, and the user would have to de-select it on the custom page. This is not to be the case as we could end up with multiple erroneous installations of that particular feature.

I have a variable that means that I know if typical/custom/complete is selected, and thought that I'd be able to use this in the Install condition of the features, but this seems to not work. I created this variable because the InstallMode variable is always Typical when I create my bat file on Commit.

I think that I just need to figure out the condition for each feature's installation.

It seems that [#MSI_NAME.msi] is blank until it is set to be installed locally.
So I just need to sort the conditions that will install a feature if Typical install is to be performed, and the condition for if a Complete install is to be performed.

I hope I'm explaining myself clearer.

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Typical/Custom/complete

Hi,
I have a variable that means that I know if typical/custom/complete is selected, and thought that I'd be able to use this in the Install condition of the features, but this seems to not work.
I'm afraid that the feature actions cannot be conditioned with a property set in an installation dialog. However, you can try using a custom action to affect the features. You can find more details in this how-to. The code in the custom action can use the property set by the buttons to determine which features will be installed.

All features should be not installed by default and the custom action should simply enable the ones which correspond to the selected button.

Also, note that the actual MSI packages should not be added in the "Files and Folders" page of your project. This will make the main installer to copy them on the target machine. Instead, the MSI files can be added as chained packages and the features can be left empty.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sdm10101
Posts: 35
Joined: Wed May 06, 2009 2:13 pm

Re: Typical/Custom/complete

Thanks.

I'll leave the support emails alone so that others can see all of this.

I had seen that how-to, but wanted to make sure there was no other (better/more correct) way.

I did have the msi's NOT in files and folders and just as chained packages, but this meant that they were not on the Organization page, and (to my recollection) were not actually installed to the Target machine during installation ( and/or maybe weren't in the custom dialog during installation).

I'll try it this way again and post the results.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Typical/Custom/complete

Hi,
I had seen that how-to, but wanted to make sure there was no other (better/more correct) way.
Unfortunately Windows Installer doesn't offer much support for installing other MSI packages during the main install.
I did have the msi's NOT in files and folders and just as chained packages, but this meant that they were not on the Organization page, and (to my recollection) were not actually installed to the Target machine during installation ( and/or maybe weren't in the custom dialog during installation).
You can still keep the features in the "Organization" page and use them to condition the chained packages. This way, a chained package will be indirectly associated with a feature.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”