InstallShield 2019 » Automation Interface
Project • This information applies to the following project types:
• | Basic MSI |
• | DIM |
• | InstallScript |
• | InstallScript MSI |
• | InstallScript Object |
• | Merge Module |
Project-specific differences are noted where appropriate.
The ISWiComponents collection contains all of the components associated with a specified feature. ISWiComponents provides an interface for enumerating all of the components in a feature. When ISWiComponents is a member of ISWiProject, it contains all of the components in the project, not just those belonging to a specified feature.
Members
Name |
Type |
Description |
Count |
Read-Only Property |
Use this property to return the total number of elements in the ISWiComponents collection. |
Item |
Read-Only Property |
Provide the index number or name of the component in order to retrieve the ISWiComponent object. The name of the component is case-sensitive—for example, “Help_Files” and “Help_files” are two different components. Item is the default property for ISWiComponents, which means that m_ISWiFeature.ISWiComponents.Item("Help_Files") is equivalent to m_ISWiFeature.ISWiComponents("Help_Files"). |
Examples
The following Visual Basic code opens a project, loops through each component in the feature NewFeature1, sets the RemoteInstallation property for each component to run from source, and finally saves and closes the project.
Dim m_ISWiProj As ISWiProject
Dim m_Feature As ISWiFeature
Dim m_Comp As ISWiComponent
Set m_ISWiProj = CreateObject("IswiAutoAutomation Interface Version.ISWiProject")
m_ISWiProj.OpenProject "C:\mysetups\build 34.ism"
Set m_Feature = m_ISWiProj.ISWiFeatures("NewFeature1")
If Not m_Feature Is Nothing Then
For Each m_Comp In m_Feature.ISWiComponents
m_Comp.RemoteInstallation = rfsSource
Next
EndIf
m_ISWiProj.SaveProject
m_ISWiProj.CloseProject
The following line illustrates how to access a particular component:
Set m_Comp = m_ISWiProj.ISWiFeatures("MyFeature").ISWiComponents("MyComponent")
Applies To
• | ISWiFeature |
• | ISWiProject |
InstallShield 2019 Help LibraryApril 2019 |
Copyright Information | Flexera |