Project Automation API Code Samples
InstallAnywhere 2024 R2
Note:If you are using a node-locked license of InstallAnywhere, the licensing libraries must be loaded while using the project automation API. This is typically done by configuring an IDE setting or by passing the following parameters through the command line when running the Java 11:
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED -Djava.library.path=IA_HOME\resource\fnp\libraries
If the library path includes spaces, ensure that you enclose the library path within quotes:
-Djava.library.path="IA_HOME\resource\fnp\libraries"
InstallAnywhere includes project automation API code samples that you can use to edit your project files programmatically in Java. These code samples are installed in the following directory:
InstallAnywhere Installation Directory\project-auto\sample\src\com\ia\projauto\samples
A readme.txt file is provided in the project-auto\sample directory that contains the following information:
• | How to Use—Explains how to run these code samples using classpath settings. |
• | Sample Code Configuration—Explains how to run these code samples by making use of Ant scripts that compile and run the API code samples by using an automationbuild.properties file. |
The following project API code samples are available:
FIle Name |
Description |
|||||||||
BuildConfig_Test.java |
Configure build target settings (Build page > Build Installers view > Build Configurations tab > Build Targets subtab). |
|||||||||
CreateNewBasicProject_Test.java |
Create a new project. |
|||||||||
CreateNewProjectFromTemplate_Test.java |
Create a new project from an existing template. |
|||||||||
InstallerUIConfig_Test.java |
Configure settings on the Installer UI page of the project. |
|||||||||
InstallTask_Test.java |
Configure the Install sequence. |
|||||||||
InstanceManagement_Test.java |
Configure settings in the Instance Management area (Project page > Advanced view). |
|||||||||
JavaSettings_Test.java |
Configure JVM settings that are available on the Project page. |
|||||||||
LogSettings_Test.java |
Configure log settings (Project page > General Settings view). |
|||||||||
OSPlatform_Test.java |
Configure OS or OS X settings (Project page > Platforms view). |
|||||||||
MaintenanceMode_Test.java |
Configure settings in the Maintenance Mode area (Project page > Advanced view). |
|||||||||
MultiTierVirtualAppliance_Test.java |
Configure settings for multi-tier virtual appliances. |
|||||||||
PostInstallAction_Test.java |
Configure the Post-Install sequence. |
|||||||||
PreInstallAction_Test.java |
Configure the Pre-Install sequence. |
|||||||||
ProjectAutomation_Test.java |
Open, configure, and save an InstallAnywhere project. |
|||||||||
ProjectDescription_Test.java |
Configure project settings that are available on the Project page. |
|||||||||
ReadReplaceXMLandSevenZipandTar_Test.java |
Configure the following actions for any sequence:
|
|||||||||
Rollback_Test.java |
Configure settings in the Rollback Settings area (Project page > Advanced view). |
|||||||||
Rules_Test.java |
Configure settings in the Installer Rules view on the Project page. |
|||||||||
Tags_Test.java |
Configure tag settings (Build page > Build Installers view > Build Configurations tab > Tags subtab) for your project. |
|||||||||
UninstallPhase_Test.java |
Configure the Uninstall sequence. |
|||||||||
Upgrade_Test.java |
Configure upgrade settings (Project page > Upgrades view). |
|||||||||
VirtualAppliance_Test.java |
Configure settings for a single-tier virtual appliance. |
|||||||||
WindowsPlatform_Test.java |
Configure Windows settings (Project page > Platforms view). |