Frequently Asked Questions about prerequisites

How can I add a prerequisite that is not in the predefined list of prerequisites?

In the Prerequisite page you can add exising installers in your package. You can add a prerequisite as follow:

  • Adding bundled prerequisite software. Use the [ Package Prerequisite ] toolbar button, “New Package Prerequisite” context menu item or Insert key. You will be prompted to pick the prerequisite setup files.
  • Adding downloadable prerequisite software. For this, you can use the [ URL Prerequisite ] toolbar button or "New URL Prerequisite” context menu item.

NotePlease keep in mind that this type of prerequisite is created with default settings, so you need to configure it manually (e.g. define proper install conditions for the prerequisite in the prerequisite install conditions tab.

How do I define prerequisite's source file?

When you add a prerequisite from the predefined list of prerequisites you will be prompted to select if you want to download the prerequisite and include it in your package or using its online location.

  • If selecting the Yes option, the prerequisite will be downloaded by default, in the Prerequisites directory (which is automatically created) in the same directory as your .AIP (project file). When building the project, in the build output folder the .EXE or the .MSI will contain these prerequisites (inside OR next to the .EXE or .MSI). You can use the CTRL + G Advanced Installer's keyboard shortcut to open the build output folder.
  • If selecting the No option, the prerequisite will not be downloaded. It will be downloaded during installation and only if the prerequisite needs to be installed (based on the install conditions defined in the prerequisite install conditions tab for the related prerequisite).

Why the installation package is turned into an .EXE when I add a prerequisite?

This is happening when the prerequisite is added in the Pre-install prerequisites section. Note that the Pre-install prerequisites are installed by an EXE boostrapper before the MSI is launched.

NoteYou can change when a prerequisite is executed by dragging it over the appropriate folder (Feature-based or Post-install).

How do I always install a prerequisite?

Simply select Always install prerequisite option in Prerequisite Conditions Tab.

Why do I receive the 4154 warning?

This warning number is accompanied by the Required Application prerequisite was not correctly installed... message. The install conditions for prerequisites are evaluated at two specific moments:

  • At the beginning of the package installation process. If the condition is met then the prerequisite will not be installed as it is already present on the target machine. If the condition is not met the prerequisite will be scheduled for installation.
  • After the installation of prerequisites. Once the prerequisites are installed the associated conditions will be re-evaluated. If the conditions are met then the prerequisites were successfully installed. If the conditions are not met then the installation of the prerequisites failed and the 4154 warning message is displayed.

Usually, this warning appears when the install conditions associated with prerequisites are not valid. In order for a prerequisite to successfully be reported as installed a valid install condition is needed that will not be met if the prerequisite is not installed and will be met if the prerequisite is installed.

How a prerequisite is scheduled for installation?

A prerequisite will be installed based its install conditions defined in the Prerequisite Install Conditions Tab. The Install Conditions section allows you to condition the prerequisite based on custom searches. You can create multiple searches for the same prerequisite. You can evaluate an install condition using the [ Evaluate... ] button.

Also, be aware by the two options below the “Install Conditions” section:

  • Install only if at least one condition is false - If this option is selected, at least one search must fail in order to install the prerequisite.
  • Install only if all conditions are false - If this option is selected, all searches must fail in order to install the prerequisite.

So, the prerequisite will be installed according to the enabled option which refers to the install condition that you have defined before.

How can I install silent a prerequisite?

Through the Install Command Lines section from the Prerequisite Setup Tab you can add optional command lines for launching the prerequisite under different UI environments.

Each command is used by your prerequisite based on the UI level of the main package, i.e. if the main package runs with full UI the command from the "Full UI" field will be used to call the prerequisite, if the main package runs with basic UI them the command from the "Basic UI" field will be used to call the prerequisite, the same for the rest.

This way you can have different command lines for each UI level:

  • Full UI - command line parameters used for an installation with full user interface
  • Basic UI - command line parameters used for an installation which shows only a progress bar
  • Silent (no UI) - command line parameters for an installation with no user interface

Note The command that you need to pass is the same as you would use to install the prerequisite silent from the command line, i.e. for .MSI packages the command is /qn.

How to skip "PrerequisitesDlg" when all prerequisites are installed

If all prerequisites are installed there's no need to show the PrerequisitesDlg. The AI_MISSING_PREREQS property is set when all prerequisites are installed, so the user can use "Show only if" to condition the display of PrerequisiteDlg.

Here are the steps:

  • add some feature-based prerequisites from the Prerequisites Page - Installer Project
  • go to the Dialogs Page and add the "PrerequisitesDlg" dialog
  • select the dialog and choose "Show only if..." option from its context menu
  • in the "Expression" field from the Edit Condition Dialog write NOT AI_MISSING_PREREQS

This way, the "PrerequisitesDlg" will be shown only when there's at least a prerequisite to be installed on the target machine.

NoteThis requires an Enterprise or Architect project.

How do I silently install the SQL Server prerequisite?

You can opt for an unattended installation of SQL Server prerequisite by adding the proper command line parameters in the "Install Command Lines" fields from prerequisite Setup Files tab.

Starting with Advanced Installer 10.9 all SQL Server Express predefined prerequisites have parameters for silent install. For example, the SQL Server Express 2012 setup can be run unattended (even on Full or Basic UI) if you use these parameters for all "Install Command Lines" fields:


TipFor a complete list of supported parameters check the official documentation from Install SQL Server from the Command Prompt MSDN article.

Why does .NET Framework fails as feature-based prerequisite?

Feature-based prerequisites are installed by Advanced Installer with a custom action that is scheduled to start the moment you enter ProgressDlg dialog, before ExecuteAction standard action in InstallUISequence, when running in full UI mode. This is done in order to avoid the conflict of running two MSI packages at the same time, which is not supported by Windows Installer.

All setup packages that have been tested work correctly with this scheduling, except .NET Framework installers. These packages contain very complicated installation logic, which sometimes includes installing OS updates, this conflicts with the current support we have for feature-based prerequisites, so you cannot install a .NET Framework as a feature-based prerequisite. The recommended way is to add it as pre-install prerequisite, which is our default.

Why do feature-based or post-install prerequisites fail when the main installer runs silently or with basic UI?

Caution!This can also happen when using the MSI from EXE project template.

The reason behind this behavior is that some setups like JDK installer do not support running under the system account. Since the prerequisites custom actions in Advanced Installer "Run under the LocalSystem account with full privileges (no impersonation)", the installation of these prerequisites will fail.

The solution is to open the CustomAction table from the Table Editor, find AI_LaunchChainer custom action row and replace its existing value from the Type column with 1266.

Why a feature-based prerequisite is not installed when its feature install condition is true?

This may happen if you set the installation behavior of your prerequisite feature to Disabled. As a workaround solution you can set it to Not Installed.

Normally a feature-based prerequisite will be installed if at install time its associated feature install conditions and its own install conditions are met. At install time the feature install conditions are evaluated during the "CostFinalize" standard action, before the installation UI appears. During this standard action the prerequisite feature state (Installed, Not Installed or Disabled) is set accordingly with its condition evaluation. Afterwards if the feature condition evaluation changes, for instance during installation UI, Advanced Installer uses its own custom action (Update Features Install States) to update the feature state accordingly with its new condition evaluation.

Unfortunately, due to a limitation of the Windows Installer API our custom action cannot update the state of a feature whose state was originally set to Disabled. This is not allowed by Windows Installer. So, the only workaround to avoid this limitation would be to set by default your prerequisite feature installation behavior to Not Installed.

How to display installing prerequisite name on ProgressDlg

By default, the installing prerequisite software message is displayed during installation of the prerequisites (feature-based and post-install) .

To display the name of each prerequisite that is installed, add a static text control and subscribe to the Display action data during installation event with the attribute set to text