ISWiObjects Collection

Project:This information applies to the following project types:

InstallScript
InstallScript Object

ISWiObjects is a collection that contains every InstallScript object (as an ISWiObject object) in your project. The following Visual Basic code illustrates the use of this collection:

    Dim pProj As ISWiProject

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

    pProj.OpenProject "C:\MySetups\Project1.ism"

    Dim pFeature As ISWiFeature

    Dim pObject As ISWiObject

 

    Set pFeature = pProj.ISWiFeatures.Item(2)

    Set pObject = pFeature.ISWiObjects.Item("@ismk2:755142B0-1EB4-11D3-8B09-00105A9846E9")

    pFeature.RemoveObject pObject

 

    pProj.SaveProject

    pProj.CloseProject

Members

ISWiObjects Collection Members

Name

Type

Description

Count

Read-Only Property

Use this property to return the total number of InstallScript objects in the ISWiObjects collection.

Item

Read-Only Property

Provide the index number or moniker of the InstallScript object to retrieve the ISWiObject object. (To get an InstallScript object's moniker, create a new Professional project in the IDE and add the InstallScript object to a feature, then go to the Direct Editor view's ISFeatureExtended table and see the Moniker column.) For example, the following statements create references to the first InstallScript object in the collection and the InstallScript object with moniker @ismk2:755142B0-1EB4-11D3-8B09-00105A9846E9:

Set pObject1 = pProj.ISWiObjects.Item(1)

Set pObject2 = pFeature.ISWiObjects.Item("@ismk2:755142B0-1EB4-11D3-8B09-00105A9846E9")

Item is the default property for ISWiObjects, which means that pFeature.ISWiObjects.Item("@ismk2:755142B0-1EB4-11D3-8B09-00105A9846E9") is equivalent to pFeature.ISWiObjects("@ismk2:755142B0-1EB4-11D3-8B09-00105A9846E9").

Applies To

ISWiFeature