View Full Version : Problem matching MSI feature to suite feature

09-10-2012, 01:38 AM
I have a simple MSI with multiple features, and a simple suite with multiple features. I know you can't associate these through the GUI, but I have manually modified the suite xml file like this:

<Selection Name="Feature1" DisplayName="ID_STRING7" Install="{E7A8D99A-A521-44CE-9460-7A36CD699520}:NewFeature1"/>

and yet it doesn't install the MSI at all.

Do I have the syntax wrong?

09-10-2012, 04:09 PM
Starting with IS 2012 Spring, there needs to be a feature that is just associated directly to the MSI package. This change was made to ensure that a package couldn't be enabled just by selecting a suite feature that only referenced a feature in the package and not the package itself.

So, to ensure this requirement is met, you could have a feature tree like the following:

<Selection Name="MSIPackage" DisplayName="..." Install="{E7A8D99A-A521-44CE-9460-7A36CD699520}">
<Selection Name="Feature1" DisplayName="ID_STRING7" Install="{E7A8D99A-A521-44CE-9460-7A36CD699520}:NewFeature1"/>

The above is the most explicit form of declaring what package and features get installed (the package is the root; when it is selected the child features control what package features are installed). An alternate way of declaring this would be to include the package ID in each package feature's Install attribute:

<Selection Name="Feature1" DisplayName="ID_STRING7" Install="{E7A8D99A-A521-44CE-9460-7A36CD699520} {E7A8D99A-A521-44CE-9460-7A36CD699520}:NewFeature1"/>

The first method is recommended as it creates a clearer and simpler definition of what is installed by a feature through the use of a hierarchical tree.

09-11-2012, 02:54 AM
Excellent! Works a treat - thanks very much for your help :)

09-20-2012, 01:36 AM
Now I have a request to do the same thing with an included basic MSI "setup.exe". I've tried what has been described below, but it doesn't seem to be working the same way. What's the trick with this type?

09-21-2012, 11:51 AM
The suite engine does not have any knowledge of any particular EXE type package, unlike MSI and InstallScript packages. As such, command lines to select features in the EXE setup need to be set in the package operations. For example, on the install operation for an EXE package, if the EXE contains an MSI installation, and you know that certain features should be selected to install for the package, the following command line should select the desired features based on suite feature selection:


Note that the above command line is specific to MSI projects built with InstallShield that are launched by the InstallShield setup.exe bootstrap. If this EXE was not built by InstallShield, the command line needs to be changed to something appropriate for the EXE being launched.

Each package (MSI, InstallScript, or EXE) in a suite install has local properties that maintain a list of features to install and remove (ISParcelFeatureInstall and ISParcelFeatureRemove). For MSI and InstallScript packages the suite engine uses these properties to automatically control what features should be installed or removed for a package. However, for EXE packages, these properties can be used to build command lines that are passed to the EXE that will be launched.

Note that the values for the above properties are comma delimited lists based on the feature selection tree in the suite. Based on the previous selection tree example in this post, ISParcelFeatureInstall or ISParcelFeatureRemove would be set to 'NewFeature1' depending on whether the feature was being installed or removed.

09-24-2012, 04:19 AM
Thanks for your reply Josh - but I can't get it to work :(

I have made a simple install using IS2012Spring, that contains a list of features and sub-features. This has been compiled to create a single compressed setup.exe file.

I have also made a simple Suite install that adds this setup.exe as a package. The suite install has a list of features and sub-features identical to the packaged setup.exe. The "EXE Silent Command Line" under "Install" within the package has the following command

/s /v"/qn ADDLOCAL=\"[ISParcelFeatureInstall]\""

I compile the suite project, run the install and select only some features from the tree, but all features of the package are being installed.

I've obviously missed something, but I can't see what. I've attached a log created by running the suite project with "/debuglog"

What am I doing wrong/missed?

09-24-2012, 03:55 PM
The log shows the following command line information for an EXE package to be launched:

9-24-2012[10:07:29 AM]: EXE parcel command line: /s /v"/qn ADDLOCAL=\"[ISParcelFeatureInstall]\""
9-24-2012[10:07:29 AM]: EXE parcel resolved command line: /s /v"/qn ADDLOCAL=\"\""

Based on this, it appears the ISParcelFeatureInstall property for this package has no value. The only likely way this would occur is if no suite features have been associated with this package (meaning a feature defined in the suite with the Install attribute set to something in the form "<Package GUID>:FeatureName").

What does the SelectionTree element collection look like in the built setup.xml for this test (the setup.xml can be found in the Interm folder for a built release)?

09-27-2012, 01:58 AM
Whoops - I knew I forgot something.

Thanks Josh - that works a treat now. All I need to do now is to figure out what command line to use for "Modify".

Install: /s /v"/qn ADDLOCAL=\"[ISParcelFeatureInstall]\""
Remove: /s /x /v"/q"
Repair: /s /f /v"/q"
Modify: /s /v"/qn ADDLOCAL=\"[ISParcelFeatureInstall]\" REMOVE=\"[ISParcelFeatureRemove]\""

I think this *should* work, but doesn't :( I'm thinking it's probably an issue with the detection of what features are currently installed, as the Suite GUI gives me all features unticked in a modify scenario, regardless of what features have previously been installed.

Any ideas?