Showing results for 
Show  only  | Search instead for 
Did you mean: 

Project Automation API InstallDirectory

Project Automation API InstallDirectory


This article discusses about using the Project Automation API InstallDirectory


This article discusses using the Project Automation API InstallDirectory Java class.


The InstallDirectory Java class adds the given directory to the installer project to be later installed by the installer. It is similar to adding a directory using the Add File... or adding a Create Folder action button via InstallAnywhere IDE. It also allows the definition of some file attributes, like UNIX permissions and destination name.

Constructor for Install Directory

public InstallDirectory()

Method Summary for InstallDirectory

Modifier and TypeMethod and Description
The children files to be installed.
boolean getRemoveRecursively()
Whether to recursively delete all contents of this folder during uninstall.
voidsetRemoveRecursively(boolean removeRecursively)
Whether to recursively delete all contents of this folder during uninstall.
Methods inherited from class
getDestinationName, getFileOverwriteBehavior, getOverrideUnixPermissions, getShouldUninstall, getSourceFile,
getUnixPermissions, setDestinationName, setFileOverwriteBehavior, setOverrideUnixPermissions,
setShouldUninstall, setSourceFile, setUnixPermissions
Methods inherited from class
getBelongsToUninstallPhase, getRollbackEnabledCancel, getRollbackEnabledError, getRuleExpression, getRules,
getRulesLogicalOperation, getTagsInInstallPiece, setBelongsToUninstallPhase, setRollbackEnabledCancel,
setRollbackEnabledError, setRuleExpression, setRulesLogicalOperation, setTagsInInstallPiece
Methods inherited from class
equals, getReferenceID, hashCode, setReferenceID
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait

Sample custom code
The following is an example of Java code that adds an install directory to the first directory in the Install Sequence. When this sample code is executed on the attached sample project a new folder is created under User Install Folder in the Install Sequence.


public class ProjectInstallAuto

        public static void main(String[] args )
            ProjectAutomation.setIALocation("Path it InstallAnywhere installation directory");

            // change to point to your project file
            Project iap = ProjectAutomation.loadProject("Path to project file");

            //Get the First Installation Folder in the tree in install-sequence      
            OSHostDestinationFolder destinationFolder = iap.getOSHost().getFolders().get(0);
            //Add a new directory to the Installation Folder   
            InstallDirectory InstDirect = new InstallDirectory();

            //save and close the project

Additional Information

For more information on the Project Automation API, click here.
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 12, 2018 05:07 PM
Updated by: