CreateProject Method

InstallShield 2022 » 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 CreateProject method creates a new InstallShield project file (.ism) for a Basic MSI, InstallScript, InstallScript MSI, InstallScript Object, or Merge Module project; it create a new InstallShield DIM project file (.dim) for DIM projects.

Syntax

CreateProject (strISWiProjectFile As String, ByVal projectType As ISWiProjectType)

Parameters

CreateProject Method Parameters

Parameter

Description

strISWiProjectFile

Enter the fully qualified path to the .ism or .dim file that you want to create. Include the full file name.

projectType

Specify what type of project you want to create. Valid values are:

eptMsi (1)—Creates a Basic MSI project.
eptScript (–1)—Creates an InstallScript MSI project.
eptPro (9)—Creates an InstallScript project.
eptProObj (10)—Creates an InstallScript Object project.
eptMsm (2)—Creates a Merge Module project.
eptDim (15)—Creates a DIM project.

Example

The following sample code creates a Basic MSI project called TestProject.ism.

Dim pProject As ISWiAutoAutomation Interface Version.ISWiProject

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

 

Dim sProjectName As String

sProjectName = "C:\InstallShield 2021 Projects\TestProject.ism"

 

pProject.CreateProject sProjectName, eptMsi

 

pProject.OpenProject sProjectName, False

 

pProject.CloseProject

Applies To

ISWiProject