Using Build Status Events

InstallShield 2016

The automation interface includes build status events—ProgressIncrement, ProgressMax, and StatusMessage—that you can use to show the progress of the build and see status updates.

Example for Basic MSI, InstallScript, and InstallScript MSI Projects

The following Visual Basic 6 code demonstrates how to use these events in a build script in Basic MSI, InstallScript, and InstallScript MSI projects.

Public WithEvents pISWiRelease As ISWiAutoAutomation Interface Version.ISWiRelease

 

Private Sub Foo()

    Dim pISWiProject As IswiAutoAutomation Interface Version.ISWiProject

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

    pISWiProject.OpenProject "C:\InstallShield 2016 Projects\My Project Name-1.ism", False

    Set pISWiRelease = pISWiProject.ISWiProductConfigs("Product Configuration 1").ISWiReleases("Release 1")

    pISWiRelease.Build

    pISWiProject.CloseProject

    Set pISWiRelease = Nothing

    Set pISWiProject = Nothing

End Sub

 

Private Sub pISWiRelease_ProgressIncrement(ByVal lIncrement As Long, pbCancel As Boolean)

    ' Place your code here

End Sub

 

Private Sub pISWiRelease_ProgressMax(ByVal lMax As Long, pbCancel As Boolean)

    ' Place your code here

End Sub

 

Private Sub pISWiRelease_StatusMessage(ByVal sMessage As String, pbCancel As Boolean)

    ' Place your code here

End Sub

Example for Advanced UI and Suite/Advanced UI Projects

The following Visual Basic 6 code demonstrates how to use these events in a build script in Advanced UI and Suite/Advanced UI projects.

Public WithEvents pISWiSuiteRelease As ISWiAutoSuiteAutomation Interface Version.ISWiSuiteRelease

 

Private Sub Foo()

    Dim pISWiProject As ISWiAutoSuiteAutomation Interface Version.ISWiProject

    Set pISWiProject = CreateObject("ISWiAutoSuiteAutomation Interface Version.ISWiProject")

    pISWiProject.OpenProject "C:\InstallShield 2016 Projects\My Project Name-1.issuite", False

    Set pISWiRelease = pISWiProject.ISWiSuiteReleases("Release 1")

    pISWiSuiteRelease.Build

    pISWiProject.CloseProject

    Set pISWiSuiteRelease = Nothing

    Set pISWiProject = Nothing

End Sub

 

Private Sub pISWiSuiteRelease_ProgressIncrement(ByVal lIncrement As Long, pbCancel As Boolean)

    ' Place your code here

End Sub

 

Private Sub pISWiSuiteRelease_ProgressMax(ByVal lMax As Long, pbCancel As Boolean)

    ' Place your code here

End Sub

 

Private Sub pISWiSuiteRelease_StatusMessage(ByVal sMessage As String, pbCancel As Boolean)

    ' Place your code here

End Sub