Summary
This article discusses about using the Project Automation API InstallDirectorySynopsis
This article discusses using the Project Automation API InstallDirectory Java class.Discussion
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 Type | Method and Description |
|---|---|
| Vector<OSHostable> | getChildren() The children files to be installed. |
| boolean | getRemoveRecursively() Whether to recursively delete all contents of this folder during uninstall. |
| void | setRemoveRecursively(boolean removeRecursively) Whether to recursively delete all contents of this folder during uninstall. |
| Methods inherited from class com.zerog.ia.auto.project.actions.FileAction |
|---|
| getDestinationName, getFileOverwriteBehavior, getOverrideUnixPermissions, getShouldUninstall, getSourceFile, getUnixPermissions, setDestinationName, setFileOverwriteBehavior, setOverrideUnixPermissions, setShouldUninstall, setSourceFile, setUnixPermissions |
| Methods inherited from class com.zerog.ia.auto.project.InstallableObject |
|---|
| getBelongsToUninstallPhase, getRollbackEnabledCancel, getRollbackEnabledError, getRuleExpression, getRules, getRulesLogicalOperation, getTagsInInstallPiece, setBelongsToUninstallPhase, setRollbackEnabledCancel, setRollbackEnabledError, setRuleExpression, setRulesLogicalOperation, setTagsInInstallPiece |
| Methods inherited from class com.zerog.ia.auto.project.ProjectObject |
|---|
| 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.
package com.company.ProjectAuto;
import com.zerog.ia.auto.project.actions.InstallDirectory;
import com.zerog.ia.auto.project.*;
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();
destinationFolder.getChildren().add(InstDirect);
//save and close the project
ProjectAutomation.saveProject(iap);
System.exit(0);
}
}
Additional Information
For more information on the Project Automation API, click here.Was this helpful?
Related Articles
Using Project Automation to Configure InstallAnywhere Project Files 4Number of Views Running Project Automation Java Class with 64-bit JDK Results in Error 3Number of Views Release Notes Index: Snow Automation Platform (Productivity Optimizer) 267Number of Views Logging An InstallScript MSI Project 350Number of Views Using the Automation Interface to Build a Project 5Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
Language changed
successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago