Custom actions

The Custom Actions editor is used to specify scripts that run at various times during the installation and perform installer actions. To view this editor, point to Editors in the View menu and choose Custom Actions.

A basic setup project can perform custom actions at four times during the install process:

  • Install
  • Commit
  • Rollback
  • Uninstall

 

You can use various types of code such as scripts or .NET assemblies to perform custom actions. Scripts are the easiest to implement, and are used in the installer for the BPSDK sample. For typical Business Portal integrations, custom actions are required for the Install and the Uninstall.

The Install custom action runs after the files have been copied from the installer file to the target machine. For a Business Portal integration, this custom action must copy or move the files to be installed into the appropriate folders for the Business Portal installation. It must also invoke the MBF Packager to install the package files for the integration.

The Install custom is also run when the install is “repaired.”

The Uninstall custom action runs when the user chooses to uninstall the Business Portal integration, but before any files are removed from the system. This custom action must remove the integration files from the Business Portal installation. It must also use the MBF Packager to remove package files for the integration.