Revenera logo

You can use the InstallShield Automation Interface to add product configurations and releases to an InstallShield project using the AddProductConfig and AddRelease methods.

After adding a product configuration or release, you specify its properties (the properties you would ordinarily enter in the Release Wizard) using the individual automation properties of the ISWiProductConfig or ISWiRelease object you created.

For example, suppose you want to create a release called “new” inside an existing product configuration called “DemoVersion1”. You can use the AddRelease method in your code as follows. Note that the script will fail if the release you name already exists in the project.

Set oISM = CreateObject(“ISWiAuto14.ISWiProject”)

‘ this time, open project as read-write
oISM.OpenProject “D:MySetupsBuildMe.ism”, False

‘ get existing configuration
Set oMyConfig = oISM.ISWiProductConfigs(“DemoVersion1”)

‘ add new release to existing configuration
Set oNewRelease = oMyConfig.AddRelease(“new”)

‘ set release properties
oNewRelease.Compressed = True
oNewRelease.SetupEXE = True
oNewRelease.TargetOS = 3 ‘ i.e., os9xNT: include both engines
‘ …set other properties…

‘ if you want, build the new release
oNewRelease.Build( )

‘ for testing
MsgBox “Done!”

‘ this time, save the project before closing it
oISM.SaveProject
oISM.CloseProject

InstallShield icon

InstallShield

Create native MSIX packages, build clean installs, and build installations in the cloud with InstallShield from Revenera.

This article only scratches the surface of the possibilities with the InstallShield Automation Interface. You can query and modify your project’s actions and sequences, summary information stream, features, components, file links and much more. For more information and examples, see the online help topic Advanced Features > Automation Interface.

How have you used the InstallShield Automation Interface?

 

InstallShield® is the world’s leading Windows installation development solution. InstallShield is designed to enable development teams to be more agile, collaborative and flexible when building reliable InstallScript and Windows Installer MSI installations for desktop, server, Web, virtual and traditional applications. The software installer of choice for today’s sophisticated application producers, InstallShield is the only software installer that can directly convert MSIs to Microsoft App-V virtual packages. Get your free trial of InstallShield today or contact us for more information.

InstallAnywhere is the leading multiplatform development solution for application producers who need to deliver a professional and consistent cross installation experience for physical, virtual and cloud environments. From a single project file and build environment, InstallAnywhere creates reliable installations for on-premises platforms – Windows, Linux, Apple OS X, Solaris, AIX , HP-UX, and IBM iSeries – and enables you to take existing and new software products to a virtual and cloud infrastructure and build Docker containers.  Get your free trial of InstallAnywhere or contact us for more information.