Execute Custom Code Action

InstallAnywhere 2018

The Execute Custom Code action allows developers to extend the functionality of InstallAnywhere. InstallAnywhere’s API is purely Java based and allows developers to do nearly anything that is possible in Java. The Execute Custom Code action represents the non-interactive interface for this API.

The Execute Custom Code customizer includes the following options:

Execute Custom Code Customizer

Option

Description

Path

Identifies the archive that contains all classes needed by the custom code action.

Choose JAR or ZIP—Click to locate the archive, and then click Open.
Clear—Click to delete the contents of the Path text box.

Class

Specify the fully qualified class name of the class that is called when the custom code is executed—for example, com.acme.MyAction.

The Execute Custom Code action can only access classes included in the archive you choose. You must include the builder version of the class if one is going to be used.

Show “Please wait...” panel

Select this option to display a message panel to the user while the execution is occurring.

Note • This option is not available for Execute Custom Code actions added to the Install sequence.

Show indeterminate dialog

Select to show an indeterminate dialog box during the execution of this command that displays the message you enter in the associated text box. The default message is Executing Custom Code...

Invoke uninstall() method

Choose whether to set the uninstall() method for the custom code to run before or after files or folders are uninstalled.

Note • This option is available only in the Install sequence.

Dependencies

Custom code tasks sometimes are dependent on other code. To bundle code archives with the installer, click Add jar or zip and select the archives of code on which your custom code depends. Click Remove to remove a listed archive.

Note • For information on the support of signed JARs as dependencies, see Support for Signed JARs as Dependencies.

Open Javadocs

Click to launch the Javadocs for the InstallAnywhere API in your default Web browser.

Note • For more information, see Custom Code APIs.

Note • You can show progress while an action installs using the Execute Custom Code customizer. See the sample in the <InstallAnywhere>/CustomCode/Samples/SampleProgress folder. See the Javadocs for more information about the classes and APIs in this sample.