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.
Creating a new event
It is possible to create Pre and Post build events.
Pre-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.
Post-Build Events
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.
You can create new events starting from some predefined templates.
Just select one from “Add->Pre/Post-Build Event” list
context menu.
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. Also, 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.
Examples
It is possible to define your own event that will be scheduled post or prior build:
- This article presents an example on how to add a predefined event
- Add a command line batch (.bat) file as a custom event
- Add a vbscript file as a custom event
- Add a custom exe file as a custom event
Topics
- 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