In this page you can specify commands to be executed in current build process. Events can be scheduled to be executed before build or after build.
Global builds events are executed for all builds from the list. If you want to have events defined only for a certain build, you must first select the build and then go to “Build Events” tab from the right side pane.
Creating a new event
It is possible to create Pre and Post build events.
This type of events are executed before the actual package is being created. They can be useful to run commands whose results are used in the package building process, like always copy files from a location to ensure that you always have the latest files included in the project before starting the build process.
This type of events are executed after the actual package is being created. They can be useful to run commands that will be performed on the resulted package file, like renaming or copying it in a different location.
Use the “Add->Pre/Post-Build Event->New...” list context menu item in order to create a new event.
Also, you can create new events starting from some predefined templates. Just select one from “Add->Pre/Post-Build Event” context menu list. Available templates are:
- File Copy... - Copies file <source_file> to <destination_file>.
- File Move... - Moves file <source_file> to <destination_file>.
- File Rename... - Ranames file <source_file> to <destination_file>.
- Folder Removal... - Removes folder <folder_path>.
- Run As... - Runs <application.exe> impersonating user <username>.
You need to substitute place holders <source_file> and <destination_file> with actual paths.
You can access the current build output path by using properties like AI_BUILD_OUTPUT_FILE or AI_BUILD_OUTPUT_FOLDER. These properties are available only during build-time. It is highly recommended to include all paths in quotation marks (" ") since some of them can contain spaces of special characters.
Edit an event
Use the “Edit” list context menu item or press the Space key in order to edit an event.
Removing an event
Use the “Delete” list context menu item or press the Delete key in order to remove an event.
Specifying the events execution order
Use the “Move Up” / “Move Down” context menu item while an event is selected.
It is possible to define your own event that will be scheduled post or prior build:
- Edit Event Dialog
The "Edit Event" dialog in Advanced Installer.
- Add a command-line batch file as a custom event
Add a bat file as an event example
- Add a VBScript file as a custom event
Add a vbs file as an event example
- Add an executable file as a custom event
Add an EXE file as an event example