InstallShield allows you to specify commands that can be run at various stages of the build process. These commands are called Build Events. This can be very useful, but in order to use this functionality, you must have the InstallShield Premier edition.
To define a Build Event, just go to the Releases view, click on a release, then click the Events tab. There you can define Prebuild, Precompressor and Postbuild events.
When you enter a command in an event, you can use any of the path variables and environment variables that are defined in your project.
Here are the variables you can use for event commands:
- ISReleaseName – name of the release that InstallShield is building.
- ISProductConfigName – name of the product configuration that contains the release that InstallShield is building.
- ISReleasePath – the build location of the release that InstallShield is building. It is set through the Release Location setting on the Build tab for a release in the Releases view.
- ISReleaseUsesShallowFolderPaths – set to true or false to indicate whether InstallShield uses a shallow folder directory structure when building your release.
For an example of a Prebuild event, have a look at the screenshot below.
Here, I have selected the Events tab for the CD release. For the Prebuild event, I am running two commands that copy a couple of SQL database files from one folder to another.