0

im kinda strugling with features associated in suite with msi features. I have suite project that has multiple MSI files. In one MSI i have features that i want optionally install.

In suite project i added this, to associate it with the checkbox in suite's feature list.

":MSIPackageFeatureName" next to

"Selection Name="NewFeature" DisplayName="ID_STRING" Install="{00000000-0000-0000-0000-000000000000}"

But the feature gets installed anyway, even if the checkbox isnt checked.

So my first question is, should i add some custom actions to change install level? Or how do i prevent the feature to be installed if the checkbox isnt checked.

+bonus. For some reason, if i check it. Some other files dont install, these files have nothing to do with the feature.

izm
  • 73
  • 8

1 Answers1

0

The InstallShield Suite can handle feature selection in one of its MSIs, but it has not been made easy. In general you'll probably find an easier time refactoring the MSI by splitting it into two (or more) along those feature lines and including those separate MSIs within the suite.

If you cannot refactor the composition of the MSIs (perhaps it's a third party MSI, or perhaps the refactor is worse that the alternative), you can follow the guidelines on Configuring Package Features from a Suite/Advanced UI or Advanced UI Installer. In particular, note the following subtle points:

  • It is important to include a Selection element that references the entire package in the format <Selection ... Install="{guid}"/>
  • In addition, you need multiple (preferably child) Selection elements that refer to the feature names in the format <Selection ... Install="{guid}:FeatureName"/>; note that once you list one {guid}:FeatureName, all features must be listed somewhere (and selected) or they will not be installed.

In your example, you have a null guid instead of the guid that the suite has assigned to the package, and you don't show child elements that specify the feature names. So it's possible that by listing one feature, but never listing another, that other feature is excluded from installation no matter what you select.

It's also not clear whether you mean you are using the InstallationFeatures page to show the check boxes, or if you are creating your own check box to toggle a single feature (the latter requires referencing the pseudo-property FEATURE[feature-name].actionState where feature-name is the name in your Selection element).

Michael Urman
  • 15,737
  • 2
  • 28
  • 44
  • Thank you, i copied the example from website. ad1 i belive i have done this point right. ad2 this might be the cause of my problem, i did run the setup with /debuglog and found the ADDLOCAL is being sent only with the name of the feature i want to install at the time the box is unchecked. Im using default Feature Installation Tree and wanted to associated it. Also i have created my own checkbox with the actionState as you described. Trying to work it out from both ways, dont know if its the best practice. – izm Feb 12 '16 at 14:08
  • @izm: no problem. What may not be clear above is that if you include any MSI feature names, but there's at least one you don't list somewhere, there's no way to install that feature. I'll see if I can make that clearer in my answer. – Michael Urman Feb 12 '16 at 14:36
  • @ Michael NOW i think you clarified the 2nd part of my problem for me. I will try it as soon as possible! thank you very much for you help – izm Feb 13 '16 at 08:35