ISWiFeature Object

InstallShield 2022 » Automation Interface

Project:This information applies to the following project types:

Basic MSI
InstallScript
InstallScript MSI

Project-specific differences are noted where appropriate.

ISWiFeature represents a top-level feature or a subfeature in InstallShield. You can retrieve a feature by specifying an item in the ISWiFeatures collection.

Many feature properties and attributes are available in the automation interface through this object's methods, properties, and collections. Refer to the following table to see which methods, properties, and collections are available for your project type.

Members

ISWiFeature Object Members

Name

Project

Type

Description

AddCondition 

Basic MSI, InstallScript MSI

Method

Adds a condition to the current ISWiFeature.

AddFeature 

Basic MSI, InstallScript, InstallScript MSI

Method

Creates an ISWiFeature object as a subfeature of the current ISWiFeature.

AddMergeModule 

Basic MSI, InstallScript MSI

Method

Associates a merge module with the current feature.

AddObject 

InstallScript

Method

Adds an InstallScript object to the current ISWiFeature.

Advertise

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the Advertisement property for the current feature. Use the following constants to set this property:

eaAllow (1)—Use this option to enable advertisement on this feature. Although advertisement is allowed, it is not the default option when the setup is run.
eaFavor (2)—Use this option to have the feature advertised by default. Your end users can always change the advertisement option for a feature in Custom Setup dialog.
eaDisallow (3)—Use this option if you do not want to allow advertising for this feature. Your end users will not be able to choose to have a feature advertised in the Custom Setup dialog.
eaDisableIfNotSupported (4)—Advertisement only works on systems with Internet Explorer 4.01 or higher. If the target system does not meet this criteria, advertising is turned off. If the target system can support advertisement, advertising is allowed.

AttachComponent 

Basic MSI, InstallScript, InstallScript MSI

Method

Associates a component with the current feature.

CDRomFolder

InstallScript

Read-Write Property

Gets or sets the feature's CD-ROM Folder property, which specifies the folder in the disk image in which the feature is placed if the feature's check box is checked in the Release wizard's Custom Media Layout panel.

Comments

Basic MSI, InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the comments associated with this feature.

DeleteCondition 

Basic MSI, InstallScript MSI

Method

Deletes a condition associated with the current feature.

Description

Basic MSI, InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the description for this feature.

DescriptionID

Basic MSI, InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the string identifier for this feature's description.

Note:To set this property, the string entry must exist and you must know the string identifier.

Destination

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the default destination of this feature.

Display

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the Display property for this feature. Use the following constants to set this property:

edtVisibleAndCollapsed (0)—Means that the feature is displayed in the Custom Setup dialog with its subfeatures collapsed by default.
edtVisibleAndExpanded (1)—Means that the feature is displayed in the Custom Setup dialog with its subfeatures expanded by default.
edtNotVisible (2)—Means that the feature is not displayed to the end user in the Custom Setup dialog.

DisplayName

Basic MSI, InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the display name of this feature.

DisplayNameID

Basic MSI, InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the string identifier for this feature's display name.

Note:To set this property, the string entry must exist and you must know the string identifier.

Encryption

InstallScript

Read-Write Property

Gets or sets the feature's Encryption property, which specifies whether the files for the feature will be encrypted by the release builder. This property is a Boolean.

Features

Basic MSI, InstallScript, InstallScript MSI

Read-Only Property

This property contains an ISWiFeatures collection of all this feature's immediate subfeatures, if any.

FTPLocation

Basic MSI, InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature's FTP Location property, which specifies an FTP location for the feature.

HTTPLocation

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature's HTTP Location property, which specifies an HTTP location for the feature.

IncludeInBuild

InstallScript

Read-Write Property

Gets or sets the feature's Include In Build property, which specifies whether the feature should be included in your distribution media. This property is a Boolean.

GUID

InstallScript

Read-Write Property

Gets or sets the feature's GUID property, which identifies the feature in the setup's log file; if you change a feature's GUID in an update setup, the setup engine treats it as a new feature rather than an update to an existing feature.

InstallLevel

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the install level of this feature.

ISWiComponents 

Basic MSI, InstallScript, InstallScript MSI

Collection

Contains all of the components associated with the current feature.

ISWiConditions 

Basic MSI, InstallScript MSI

Collection

Contains all of the conditions associated with the current feature.

ISWiObjects 

InstallScript

Collection

Contains all of the InstallScript objects associated with the current feature.

Miscellaneous

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature’s Miscellaneous property, which associates a text string with the feature.

Name

Basic MSI, InstallScript, InstallScript MSI

Read-Only Property

Feature name of the current element in the collection.

Need

InstallScript

Read-Write Property

Gets or sets the feature's File Need property, which specifies whether a warning, a severe warning, or no warning should be given to end users who deselect the feature. Use the following constants to set this property:

efnCritical (0)—Use this option for features that your setup does not allow end users to deselect.
efnHighlyRecommended (1)—Use this option to advise end users that the feature should be installed.
efnStandard (2)—Use this option to let end users deselect the feature with no message issued.

OnInstalled

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature's OnInstalled property, which specifies the function to be executed just after the feature is installed.

OnInstalling

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature's OnInstalling property, which specifies the function to be executed just before the feature is installed.

OnUninstalled

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature's OnUninstalled property, which specifies the function to be executed just after the feature is uninstalled.

OnUninstalling

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the feature's OnUninstalling property, which specifies the function to be executed just before the feature is uninstalled.

Password

InstallScript

Read-Write Property

Gets or sets the feature's Password property, which specifies a password for the feature.

ReleaseFlags

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the release flags that are associated with this feature. Separate multiple flags with a comma.

You can specify which release flags you want to use to filter the project's features in the ReleaseFlags property of ISWiRelease.

RemoteInstallation

Basic MSI, InstallScript MSI

Read-Write Property

Retrieves or sets the feature's Remote Installation property. Use the following constants to set this property:

efrLocal (0)—Means that all of the feature's files are installed onto the target system.
efrSource (1)—Causes the files belonging to this feature to run directly from the source medium, such as a CD-ROM or network server.
efrFollowParent (2)—Gives a subfeature the Remote Installation property of its parent feature.

RemoveComponent 

Basic MSI, InstallScript, InstallScript MSI

Method

Removes a component from this feature.

RemoveFeature 

Basic MSI, InstallScript, InstallScript MSI

Method

Deletes the specified feature from the project.

RemoveMergeModule 

Basic MSI, InstallScript MSI

Method

Removes a merge module from the current feature.

RemoveObject 

InstallScript

Method

Removes an InstallScript object from the current ISWiFeature.

Required

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the feature's Required property. This property is a Boolean.

RequiredFeatures

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets a comma-delimited string that lists the names of the features that are specified in the current feature's Required Features property.

SetupTypeStatus

InstallScript, InstallScript MSI

Read-Write Property

Gets or sets the selection status of the feature in the setup type that is specified in the property's argument. Use the following constants to set this property:

estSelected (10)—The feature is selected.
estDeselected (11)—The feature is not selected.

In the following Visual Basic code snippet, the Help_Files feature is not selected for the Compact setup type.

Set pFeature = pProject.ISWiFeatures.Item("Help_Files")

Set pSetupType = pProject.ISWiSetupTypes.Item("Compact")

pFeature.SetupTypeStatus(pSetupType) = 11

StatusText

InstallScript

Read-Write Property

Gets or sets the feature's Status Text property, which specifies the text that end users see in the uppermost line of the progress indicator during the transfer of this feature.

Visible

InstallScript

Read-Write Property

Gets or sets the feature's Visible property, which specifies whether the feature will be visible in feature dialog boxes during the installation. This property is a Boolean.

Applies To

ISWiProject