InstallerContactSite Map

These custom actions are already implemented in Advanced Installer and they can be used for your installation package.

1. Launch File as Administrator

This predefined custom action can be used to launch any file as an Administrator (the equivalent of Run As... or Run As Administrator Windows Shell options). It can be used only as an "UI Custom Action" through a "DoAction" control event (it requires the Dialog Editor feature).

This custom action uses the following input installer properties:

  • RunAsAdminFile - this property should be set to the path of the file that needs to be launched.
  • RunAsAdminCmd (optional) - this property should be set to the command line to be passed to the file that will be launched.
  • RunAsAdminWorkingDir (optional) - this property should be set to the desired working directory, otherwise the current directory will be used as working directory.

These input properties may contain Windows Installer formatted references.

UACFor the button which uses this custom action you should set the Elevation Shield control property to True. This will make the OS (Vista, and above) show an elevation shield on the button when the installation runs, in order to warn the installing user that an elevation request is about to happen when the button is pressed.

2. Test ODBC Connection

You can use this UI custom action when you want to validate user input parameters for an SQL ODBC Connection by testing the connection from within the "SQLConnectionDlg" dialog. For details please see: Test SQL Connection.

3. Update MSI Edit Controls

This UI-only custom action provides a workaround for a Windows Installer issue. For more information on how to use it please see: Set Edit control text on button push.

4. Browse For File

This UI custom action will display an Open File dialog during the installation. See the Browse For File tutorial for details on how to configure your project.

5. Predefined custom actions for working with ComboBox controls

Populate ComboBox, Delete from ComboBox and Extract ComboBox Data are UI-only custom actions that can be used to populate, delete from and extract data from ComboBox controls. See the ComboBox and ListBox controls tutorial for details and sample projects.

6. Predefined custom actions for working with ListBox controls

Populate ListBox, Delete from ListBox and Extract ListBox Data are UI-only custom actions that can be used to populate, delete from and extract data from ListBox controls. See the ComboBox and ListBox controls tutorial for details and sample projects.

7. Collect installation data and send it to a web server

You can use this UI custom action when you want to collect installation data and send it to your web server for processing. Install information can only be collected through Windows Installer properties (their values). For details please see: Collect installation data and send it to a web server.

8. Preserve the old version's Install Type

This predefined custom action allows your package to use the same installation type as the version it upgrades through the automated upgrade feature. For example, your package will be installed per-user if it upgrades a per-user installation or it will be installed per-machine if it upgrades a per-machine installation.

ImportantThe package which uses this custom action should require Administrator privileges, otherwise, it may not be able to run. Therefore, your package should use a Per-user only (with administrator rights required) or Per-machine only (fails if user is not administrator) installation type.

NoteThis custom action uses the current package's Upgrade Code to find the older versions.

9. Uninstall previous versions

With this custom action you can uninstall the older versions of your product, no matter what Installation Type they use (per-user or per-machine). It can be used as an UI Custom Action or under InstallUISequence.

TipIt is recommended to schedule this custom action before "InstallUISequence" -> "CostFinalize". This way it will run right before the installation starts.

NoteThe custom action uses the package's UpgradeCode to find the older versions.

10. Play Audio File

This custom action allows you to play an audio file during the installation. For more details please see the Play an Audio file how-to.

11. Check TCP port

This custom action allows you to check if a TCP port is free. This custom action runs only on Windows 2000 or greater systems. For more details see the Check TCP port how-to.

The following Windows Installer properties are used to configure this custom action:

  • AI_BIND_TCP_HOST - The local computer's host name or IP(Optional). If the property value is empty then localhost is used.
  • AI_BIND_TCP_PORT - TCP port to check

The custom action returns the check's result in the Windows Installer property AI_PORT_TEST_RES. The property can have the following values:

  • FreePort - the port is free
  • UsedPort - the port is used
  • SockError - an error occurred

12. Get free TCP port

This custom action allows you to get a free TCP port. This custom action runs only on Windows 2000 or greater systems. For more details see the Get a free TCP port how-to.

The following Windows Installer properties are used to configure this custom action:

  • AI_BIND_TCP_HOST - Host name of IP of the local computer(Optional). If the property value is empty the local host is used
  • AI_SEARCH_TCP_PORT - This property contains the port from which the search is started and will also contain the free port returned by the search

If the port is free then the AI_PORT_TEST_RES property's value is "FreePort", otherwise it's empty.