AddSuiteFeature Method (Advanced UI and Suite/Advanced UI)

InstallShield 2019 » Automation Interface » Advanced UI and Suite/Advanced UI

Project • This information applies to the following project types:

Advanced UI
Suite/Advanced UI

Edition • The Advanced UI project type is available in the Professional edition of InstallShield. The Suite/Advanced UI project type is available in the Premier edition of InstallShield. For information about the differences between these two project types, see Advanced UI Projects vs. Suite/Advanced UI Projects.

The AddSuiteFeature method creates a feature with the specified name. AddSuiteFeature is a member of ISWiProject. The new feature is added to the current project as a root-level feature, but when this method is a member of an ISWiSuiteFeature object, the new feature is added as a subfeature of the current feature.

The feature is created with the same default properties that new features have when you add them in InstallShield.

After you have added the feature, you can set its other properties and associate packages with it.

Syntax

AddSuiteFeature (SuiteFeatureKey As String) As ISWiSuiteFeature

Parameters

AddSuiteFeature Method Parameters

Parameter

Description

SuiteFeatureKey

The feature key is the same as the name of the feature that is displayed in the Features view. The name becomes the index for the new ISWiSuiteFeature object. This string must contain only alphanumeric characters, dots (.), or underscores (_), and it must begin with a letter or an underscore. FeatureKey must be unique among your project’s feature names.

Feature names are case-sensitive.

Example

The following Visual Basic lines demonstrate calling AddSuiteFeature to add a feature and a subfeature:

Dim pProject As ISWiProject

 

Set pProject = New ISWiProject

pProject.OpenProject "C:\MySetups\SampleApp.issuite"

 

Dim pFeat1, pFeat2 As ISWiSuiteFeature

Dim sFeat1Name, sFeat2Name As String

 

sFeat1Name = "ParentFeature"

sFeat2Name = "SubFeature"

 

' Add the feature ParentFeature, then SubFeature under ParentFeature

Set pFeat1 = pProject.AddSuiteFeature(sFeat1Name)

Set pFeat2 = pFeat1.AddSuiteSubFeature(sFeat2Name)

 

pProject.SaveProject

pProject.CloseProject

Applies To

ISWiProject