ISWiProductConfigs Collection

InstallShield 2022 » Automation Interface

Project:This information applies to the following project types:

Basic MSI
InstallScript
InstallScript MSI
InstallScript Object
Merge Module

InstallScript and InstallScript Object projects contain only one element in ISWiProductConfigs; it is named Media.

The ISWiProductConfigs collection contains all of the product configurations in the current project.

Members

ISWiProductConfigs Collection Members

Name

Type

Description

Count

Read-Only Property

Use this property to return the total number of elements in the ISWiProductConfigs collection.

Item

Read-Only Property

Provide the index number or name of the product configuration in order to retrieve the ISWiProductConfig object.

The name of the product configurations is case-sensitive—“Product One” and “Product one” are two different configurations.

Item is the default property for ISWiProductConfigs, which means that pProject.ISWiProductConfigs.Item("Version 1") is equivalent to pProject.ISWiProductConfigs("Version 1").

Example

The VBScript example below simply displays a string with each product configuration in the project:

    Dim pProject

    Set pProject = CreateObject ("IswiAutoAutomation Interface Version.ISWiProject")

    pProject.OpenProject "C:\MySetups\Vegetarian.ism", True

    

    Dim sNames

    sNames = "This project contains the following product configurations: " & vbNewLine & vbTab

    

    Dim pProductConfigs

    For Each pProductConfigs In pProject.ISWiProductConfigs

        sNames = sNames & pProductConfigs.Name & vbNewLine & vbTab

    Next

    

    pProject.CloseProject

    

    WScript.Echo sNames

The following line illustrates how to access a particular product configuration:

    Set pProdConfig = pISWiProj.ISWiProductConfigs.Item("Version 1.1")

Applies To

ISWiProject