PreviousNext
Help Library

ISWiProject Object

InstallShield 12 » Automation Interface

Project-Specific

PROJECT

This information does not apply to QuickPatch projects.

ISWiProject contains the interface for opening, closing, and saving an InstallShield project (.ism) file. When InstallShield is installed on your system, you can instantiate a copy of ISWiProject with the following VB and VBScript syntax:

    Set m_ISWiProject = CreateObject("IswiAuto12.ISWiProject")

To open an installation project, call the OpenProject method, as follows:

    ' Build path to the .ism file

    strFile = 
"C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Test.ism"   

    m_ISWiProject.OpenProject strFile

Build Status Events

The ISWiProject object raises the following status events:

These events are raised during the build process and provide status updates. You can set pbCancel to stop the build.

Many feature properties and attributes are available in the automation interface through this object's methods, properties, and collections. The following table lists the ISWiProject Object members. Remember that some methods, properties, and collections are only available for a particular project type.

Members

IsWiProject Object Members 

Name

Project

Type

Description

ActiveLanguage

All

Read-Write Property

Gets or sets the default language of the project. Specify a single language as a string language ID.

The automation interface uses the active language whenever you get or set a localizable property, such as ISWiShortcut's DisplayName. In the IDE, localizable properties must use a string table entry. If the property has a string ID, the string you enter for the property becomes the value in the string table for the active language.

AddAdvancedFile

InstallScript, InstallScript Object

Method

Creates an advanced file with the specified name and (optionally) in the specified disk image in the current project.

AddAutomaticUpgradeEntry

Basic MSI, InstallScript MSI

Method

Creates a new ISWiAutomaticUpgradeEntry item and returns a handle to that object.

AddComponent

All

Method

Creates an ISWiComponent object in the current project.

AddCustomAction

Basic MSI, InstallScript MSI

Method

Creates an ISWiCustomAction object in the current project.

AddFeature

All

Method

Creates an ISWiFeature object in the current project.

AddLanguage

All

Method

Adds a language to the current project.

AddProductConfig

Basic MSI, InstallScript MSI

Method

Creates an ISWiProductConfig object in the current project.

AddProperty

Basic MSI, InstallScript MSI

Method

Creates a new ISWiProperty item and returns a handle to that object.

AddSetupFile

InstallScript, InstallScript Object

Method

Creates a support file with the specified name in the current project.

AddSetupType

InstallScript, InstallScript Object

Method

Creates a setup type with the specified name in the current project.

AddUpgradeTableEntry

Basic MSI, InstallScript MSI

Method

Creates a new ISWiStaticUpgradeEntry item and returns a handle to that object.

AdminExecuteSequence

Basic MSI, InstallScript MSI

Read-only Property

Returns an ISWiSequence object representing the Administration Execute sequence in the current project.

AdminUISequence

Basic MSI, InstallScript MSI

Read-only Property

Returns an ISWiSequence object representing the Administration User Interface sequence in the current project.

AdvtExecuteSequence

All

Read-only Property

Returns an ISWiSequence object representing the Advertisement Execute sequence in the current project.

AdvtUISequence

All

Read-only Property

Returns an ISWiSequence object representing the Advertisement User Interface sequence in the current project. (Note that validation rule ICE78 requires the Advertisement User Interface sequence to be empty. For more information, see ICEs.)

BuildPatchConfiguration

Basic MSI, InstallScript MSI

Method

Calling this method builds the patch configuration identified by the strPatchConfiguration variable. This action has the same effect as right-clicking on a patch configuration in the Patch Design view and then selecting 'Build Patch'.

BuildPCPFile

Basic MSI, InstallScript MSI

Method

Builds a patch package based on a .pcp file.

CloseProject

All

Method

Closes an InstallShield installation project.

CreatePatch

Basic MSI, InstallScript MSI

Method

Caution

The CreatePatch method is deprecated for new development. It has been replaced with the BuildPCPFile and BuildPatchConfiguration methods.

DeleteAdvancedFile

InstallScript, InstallScript Object

Method

Deletes the specified advanced file from the current project.

DeleteComponent

All

Method

Deletes the specified component from the project.

DeleteCustomAction

Basic MSI, InstallScript MSI

Method

Deletes an ISWiCustomAction object in the current project.

DeleteMergeModule

Basic MSI, InstallScript MSI

Method

Deletes a merge module from the current project.

DeleteProductConfig

Basic MSI, InstallScript MSI

Method

Deletes an ISWiProductConfig object from the current project.

DeleteProperty

Basic MSI, InstallScript MSI

Method

Deletes a property from the Property table.

DeleteSetupFile

InstallScript, InstallScript Object

Method

Deletes the specified support file from the current project.

DeleteSetupType

InstallScript, InstallScript Object

Method

Deletes the specified setup type from the current project.

DeselectLanguage

All

Method

Deselects a language from the current project.

ExportProject

All

Method

Causes the .ism file to use the XML representation, which is better suited for source code integration.

ExportStrings

All

Method

Exports string table entries to a text file.

GenerateGUID

All

Method

Generates a new, unique GUID as a string.

ImportProject

All

Method

Converts an .isv file (a text file kept in a source code integration program) to an InstallShield .ism project file.

Note

The .isv file format has been deprecated to version 2.x of InstallShield for Windows Installer and versions of InstallShield Developer prior to 8.x.

ImportStrings

All

Method

Imports string table entries from a text file.

INSTALLDIR

Basic MSI, InstallScript MSI

Read-Write Property

Sets the INSTALLDIR property for the project. A typical value is "[ProgramFilesFolder]CompanyName\ProductName".

InstallExecuteSequence

Basic MSI, InstallScript MSI

Read-only Property

Returns an ISWiSequence object representing the Installation Execute sequence in the current project.

InstallUISequence

Basic MSI, InstallScript MSI

Read-only Property

Returns an ISWiSequence object representing the Installation User Interface sequence in the current project.

ISWiAdvancedFiles

InstallScript, InstallScript Object

Collection

Contains every advanced file (as an ISWiAdvancedFile object) in your project.

ISWiAutomaticUpgradeEntries

Basic MSI, InstallScript MSI

Collection

Returns a collection of ISWiAutomaticUpgradeEntry items. This collection presents a list of Automatic Upgrade Items as they are defined in the IDE.

ISWiComponents

All

Collection

Contains all of the components in this project.

ISWiCustomActions

Basic MSI, InstallScript MSI

Collection

Contains all of the custom actions in this project.

ISWiFeatures

All

Collection

Contains all features' names and their components.

ISWiProductConfigs

All

Collection

Contains all of the product configurations in this project.

ISWiProperties

Basic MSI, InstallScript MSI

Collection

Contains all of the Windows Installer properties in this project.

ISWiSequence

All

Collection

Contains all of the top-level Windows Installer sequences in this project.

ISWiSetupFiles

InstallScript, InstallScript Object

Collection

Contains every support file (as an ISWiSetupFile object) in your project.

ISWiSetupTypes

InstallScript, InstallScript Object

Collection

Contains every setup type (as an ISWiSetupType object) in your project.

ISWiSISProperties

Basic MSI, InstallScript MSI

Collection

Contains all of the Summary Information Stream properties in this project.

ISWIUpgradeTableEntries

Basic MSI, InstallScript MSI

Collection

Returns a collection of ISWiStaticUpgradeEntry items. This collection presents a list of static major upgrade items, as defined in the IDE.

ModuleID and ModuleIDGUID

Basic MSI, InstallScript MSI

Read-Write String Properties

Note

These properties are used only with merge module projects.Every merge module has a record in the ModuleSignature table. The ModuleID field of the ModuleSignature is composed of two sections: ModuleID.ModuleIDGUID.

For example,

  • IDID.019880FB_04F2_4D4B_99C9_9A0A12185229The ModuleID property gets or sets IDID.
  • The ModuleIDGUID property gets or sets 019880FB_04F2_4D4B_99C9_9A0A12185229.

OpenProject

All

Method

Opens an InstallShield installation project (.ism file).

This method fails if the project is open in the InstallShield user interface.

PackageCode

Basic MSI, InstallScript MSI

Read-Write Property

Stores the package code as a string GUID. The GUID must be surrounded by braces—{12345678-1234-1234-1234-1234567890AB}, for example.

ProductCode

All

Read-Write Property

Stores the product code as a string GUID. The GUID must be surrounded by braces—{12345678-1234-1234-1234-1234567890AB}, for example.

This property is not available for merge module projects.

ProductName

All

Read-Write Property

Gets or sets the product name.

ProductVersion

All

Read-Write Property

Contains the version number of the project as a string.

RemoveFeature

All

Method

Deletes a feature from the project.

SaveProject

All

Method

Saves an InstallShield installation project.

SchemaVersion

All

Read-Write Property

Enables you to save your project file (.ism) as the current schema version of InstallShield or as an earlier schema version every time that it is saved through the automation interface. Saving a project to an earlier schema enables users who have not upgraded to the same version of InstallShield to open and maintain your project. Specify one of the following schema version values in this property:

  • epvCurrent (current version of InstallShield—applies to InstallScript or Windows Installer projects)
  • epv90 (InstallShield DevStudio 9.0—applies to InstallScript or Windows Installer projects)
  • epv801 (InstallShield Developer 8.01—applies to Windows Installer projects only)
  • epv80 (InstallShield Developer 8.0—applies to Windows Installer projects only)
  • epv704 (InstallShield Developer 7.04—applies to Windows Installer projects only)
  • epv701 (InstallShield Developer 7.01—applies to Windows Installer projects only)

Note that when you save your project to an earlier version of an InstallShield product, the schema of your project is modified to conform to the earlier version; any tables or columns that are available in the later version of the InstallShield product but not in the earlier version are lost during the downgrade process.

If you save an InstallScript project as an earlier schema version, the script file (.rul) is not downgraded to the earlier version; only the .ism file is downgraded. If a script file created or modified in the later version of the InstallShield product contains functions that are not available in the earlier version, your script will not compile in the earlier version.

UpgradeCode

Basic MSI, InstallScript MSI

Read-Write Property

Gets or sets the Upgrade Code property as a string GUID. The GUID must be surrounded by braces—{12345678-1234-1234-1234-1234567890AB}, for example.

This property is not available for merge module projects.

UseXMLProjectFormat

All

Boolean Read-Write Property

Specifies whether the project file should use the XML file format.




Macrovision Corporation
copyright
contact