How to run a custom action before and after a prerequisite installation

Sometimes, standard procedures aren't enough, and you need to incorporate custom actions to ensure everything runs smoothly. If you find yourself in need of executing specific actions before or after the installation of a prerequisite, fear not.

Here's a guide on how to seamlessly integrate your custom actions into your setup process:

1. Add your custom action as a custom action without sequence:

Add custom action tab

This ensures that your action gets executed on a specific event e.g. before or after prerequisite installation, without being tied down to a specific step in the installation process.

2. Once added, the custom action will be available in the Existing Custom Actions view:

Existing custom actions

This centralized tab provides a convenient overview of all the custom actions from your setup.

3. In the Prerequisite Setup Files tab, select the custom action that will be executed before or after the prerequisite installation:

Prerequisites setup file tab

Whether you prefer PowerShell scripts, batch files, or any other method, there are no restrictions. This flexibility empowers you to tailor your actions precisely to your project's needs, ensuring optimal functionality and efficiency.