ISWiProperties Collection

InstallShield 2016 » Automation Interface

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module

The ISWiProperties collection contains all of the Windows Installer properties in the current project. This interface is similar to the Property Manager. You can add a property with the AddProperty method and delete a property with the DeleteProperty method.

The VBScript code below retrieves a list of every property in the project and displays them in a message box:

Option Explicit

 

Dim pProject

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

 

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

 

Dim sProps

Dim pProp

 

For Each pProp In pProject.ISWiProperties

    sProps = sProps & pProp.Name & ": " & pProp.Value & "  // " & _

             pProp.Comments & vbNewLine

Next

 

WScript.Echo sProps

 

pProject.CloseProject

Members

ISWiProperties Collection Members

Name

Type

Description

Count

Read-Only Property

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

Item

Read-Only Property

Provide the index number or name of the property in order to retrieve the ISWiProperty object.

The name of the property is case-sensitive—“UpgradeCode” and “Upgradecode” are two different properties.

Item is the default property for ISWiProperties, which means that pISWiProject.ISWiProperties.Item("UpgradeCode") is equivalent to pISWiProject.ISWiProperties("UpgradeCode").

Applies To

ISWiProject