cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rune_paulsen
Level 5

Suite feature and MSI feature

Today i have an MSI installer which included 2 main features.

The first feature is mandatory.

The second feature should not be installed by default, the user need to select this using custom installation.

To be able to choose this feature using a silent installation, i have linked this feature to a property.
To install this feature silently, i can use this command:

Feature get installed
msiexec /i setup.msi CSMPROP="Yes"
Or
Feature dont get installed
msiexec /i "setup.msi" CSMPROP="No"

By just running
msiexec /i "setup.msi"
Will feature will not be installed.


This is working correctly.

I have added this msi to a new Suite project.

When i use the Suite to install, this feature gets installed by default.

I have tried to update the packages "MSI Command Line" with CSMPROP="No", but this don’t have any effect.

Question:

How do i choose which MSI feature to install using the Suite?
Labels (1)
0 Kudos
(6) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Does your MSI installer do what you want if you run it silently?

msiexec /i setup.msi /qn CSMPROP="Whichever"

If not, you'll need to fix this (note that the UI sequence is not executed in this scenario; only the execute sequence is) before it will work. Alternately you can pass the ADDLOCAL property with a list of the features that should be installed.
0 Kudos
rune_paulsen
Level 5

Hi

Thanks for quick response.

Yes, my MSI installer works correct when run silently.

msiexec /i setup.msi /qn CSMPROP="Yes", is installing my feature.

msiexec /i setup.msi /qn CSMPROP="No", is not installing my feature.

Just running
msiexec /i setup.msi /qn, is not installing my feature.

Using the Suite to install the msi, all feature gets installed.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The suite is typically going to try to add ADDLOCAL="feature list" on the command line (or ADDLOCAL="ALL" if there were no suite features associated to MSI features for the package) passed to an MSI package. Depending on how your feature conditions were authored, ADDLOCAL="ALL" can override the feature conditions and cause all features to be installed.

For example, an MSI feature with a default install level of 101 (deselecting the feature by default) with a feature condition to set the feature install level to 1 (selecting the feature) if the condition is true will not have any effect if ADDLOCAL is set to ALL. Even though the default level of the feature should cause it to be deselected, it will be installed when ADDLOCAL=ALL is specified.

You can prevent this behavior by changing the feature conditions to set the feature install level to 0 in the case that the feature should not be installed and set it to 1 in the case where the feature should be installed. However, when the feature level is 0, the feature will not be displayed in the MSI feature selection tree with the native MSI user interface. In addition, the condition that disables the feature (level 0) needs to be written such that it does not evaluate to true in maintenance mode, otherwise the feature could be orphaned on a target machine if it was originally installed.

As an alternate approach to changing the feature conditions, you may try adding ADDLOCAL="" on the MSI Command Line for the Install operation in your suite project. This should prevent the suite engine from attempting to build and pass a value for the ADDLOCAL property while not changing the feature selection for the MSI.
0 Kudos
rune_paulsen
Level 5

Hi

Ok, the ADDLOCAL override my feature condition i set with properties.

Good to know.

In my Suite i have update component MSI commandline to:
INSTALLDIR="[ISInstallDir_Petrel]" ADDLOCAL=FeatureA

But, when i install, i only get FeatureA, not any off the subfeature.

Do i need to update the MSI commandline to:
INSTALLDIR="[ISInstallDir_Petrel]" ADDLOCAL=FeatureA,Feature1SubA,Feature1SubA,Feature1SubB,Feature1SubC

Is this correct?

Also, i need to add a package for each of the main feature i have in my MSI installer?
Package A, will install MSI featureA
Package B, will install MSI feature B
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

ADDLOCAL is a specific list of features to install (http://msdn.microsoft.com/en-us/library/windows/desktop/aa367536(v=vs.85).aspx). Therefore, to get children of a given parent feature to be installed, the children need to be passed to ADDLOCAL as well.

If you want to control the features to be installed for one MSI package, the package should only be added once to the suite project. It is possible to define what features should be installed with the suite feature tree. Currently, the IDE only supports associating features to packages. However, the suite runtime also supports features that are associated directly to package features (in this case, the MSI package's features). Normally, features are defined by the IDE as follows:




The Install attribute normally is a space delimited list of package IDs (these can be found per-package in the Packages view) to install for the feature. The Install attribute can also use the following form:

Install="{00000000-0000-0000-0000-000000000000}:MSIPackageFeatureName"


Using this, you can build a feature tree in the IDE under the main package feature that matches the feature tree of your MSI package. Features in the MSI that should always be installed (or shouldn't be user selectable) can be marked as not visible. Once the feature tree is created in the IDE, open the project in a text editor to associate suite features with specific MSI features.

At runtime, when this package is installed, the suite engine will build a list of features to pass to ADDLOCAL (assuming ADDLOCAL= is not present on the package command line).
0 Kudos
rune_paulsen
Level 5

Thanks

By using Install attribute, i was able to build the same feature tree.

Now i have:

Suite Feature A: MSI Feature A, subfeature B, subfature C
Suite Feature B: MSI Feature D
Suite Feature C: MSI Feature E
Suite Feature 😧 Another exe installer

But, i have some problem with removal of feature, if a remove a feature when running in the modify modus.

For example.

I first run the installer installing all feature.
Then i run the installer again, choose modify.
Deselected Feature C and Feature D.

But only Feature D get removed.

If i run the installer again, choose modify, Feature C is still selected.


Another example.

I first run the installer, choose custom installation, deselect feature C.

Feature C don’t get installed.

Run the installer again, choose modify, add Feature C.

Feature C gets installed.

Run the installer again, choose modify, deselect Feature C.

Feature C don’t get removed

Summary, adding one of the MSI feature work, but not removal.

What is missing in my Suite setup?
0 Kudos