ISWiFeatures Collection
Project:This information applies to the following project types:
• | Basic MSI |
• | InstallScript |
• | InstallScript MSI |
ISWiFeatures is a collection that contains every feature (as an ISWiFeature object) in your project.
When ISWiFeatures is a member of ISWiProject, it contains all of the top-level features in the project. To retrieve a collection of subfeatures, access the Features property of the ISWiFeature object. The result is an ISWiFeatures collection that contains the immediate subfeatures of the current top-level feature. Repeat for further levels of subfeatures.
Members
Name |
Type |
Description |
Count |
Read-Only Property |
Use this property to return the total number of elements in the ISWiFeatures collection. |
Item |
Read-Only Property |
Provide the index number or name of the feature to retrieve the ISWiFeature object. For example, the following statements create a copy of the first item in the collection and of the feature named Help_Files: Set pFeat1 = m_ISWiProject.ISWiFeatures.Item(1) Set pFeat2 = m_ISWiProject.ISWiFeatures.Item("Help_Files") The name of the feature is case-sensitive—for example, “Help_Files” and “Help_files” are two different features. Item is the default property for ISWiFeatures, which means that m_ISWiProject.ISWiFeatures.Item("Help_Files") is equivalent to m_ISWiProject.ISWiFeatures("Help_Files"). |
Example
The following Visual Basic code builds a string with all of the features and components in your project:
Dim pFeature As ISWiFeature
Dim pComponent As ISWiComponent
For Each pFeature In m_ISWiProject.ISWiFeatures
' Add feature to string
strProject = strProject & "Feature: " & pFeature.Name & vbNewLine
strProject = strProject & "Components: "
For Each pComponent In pFeature.ISWiComponents
' Add feature's components to string
strProject = strProject & pComponent.Name & " "
Next
strProject = strProject & vbNewLine
Next
Applies To
• | ISWiProject |