Modify Text File - In Archive Action
InstallAnywhere 2024 R2
You can use the Modify Text File - In Archive action to alter text files within an archive (ZIP or JAR). The Modify Text File - In Archive customizer includes the following options:
Option |
Description |
|||||||||||||
Installed Archive |
Choose this option to modify files in an archive your installer deploys on the target system. (Available only in the Install and Post-Install sequences.) |
|||||||||||||
Existing Archive |
Choose this option to modify files in an archive that already exists on the target system. Note:Ensure the name and path to the file you specify matches, including case-sensitivity, to the name of the target file. |
|||||||||||||
Archive Path |
Type the path to the file you want to modify in the archive. The path of the text file to modify should be starting at the root of the archive specified as the target of the action. For example,
Note:The Archive Path value should not be the full, absolute path beginning at the root of the archive. For example: C:\sample\META-INF\someProps.properties. |
|||||||||||||
Change Line Endings To |
Specify the type of line ending to use in the text file:
To ensure that the line endings conform to the built-in line endings for the target system, choose User’s Platform. |
|||||||||||||
Source File Encoding |
Enter the encoding type of the source file that you are modifying. For a list of supported encoding types, view the Supported Encodings page for the version of Java you are using: |
|||||||||||||
Java 11 |
https://docs.oracle.com/en/java/javase/11/intl/supported-encodings.html |
|||||||||||||
Java 17 |
https://docs.oracle.com/en/java/javase/17/intl/supported-encodings.html |
|||||||||||||
Java 21 |
https://docs.oracle.com/en/java/javase/21/intl/supported-encodings.html |
|||||||||||||
If the encoding type you enter in the Destination File Encoding field is invalid or unsupported, then system default encoding will be applied. If you leave the Destination File Encoding field blank, then UTF‑8 encoding will be attempted. If the installer fails to apply UTF-8, then system default encoding will be applied. Note:Note the following regarding file encoding:
|
||||||||||||||
Destination File Encoding |
Enter the encoding type of the destination file to be saved after it has been modified by the Modify Text File action. For a list of supported encoding types, view the Supported Encodings page for the version of Java you are using: |
|||||||||||||
Java 11 |
https://docs.oracle.com/en/java/javase/11/intl/supported-encodings.html |
|||||||||||||
Java 17 |
https://docs.oracle.com/en/java/javase/17/intl/supported-encodings.html |
|||||||||||||
Java 21 |
https://docs.oracle.com/en/java/javase/21/intl/supported-encodings.html |
|||||||||||||
If the encoding type you enter in the Destination File Encoding field is invalid or unsupported, or if you leave this field blank, then UTF‑8 encoding will be attempted. If the installer fails to apply UTF-8, then system default encoding will be applied. Note:Note the following regarding file encoding:
|
||||||||||||||
Additional Text |
Use this option to instruct the installer to add additional text to text file. Choose one of the following options:
|
|||||||||||||
Substitute InstallAnywhere variables in file |
Select to replace any InstallAnywhere variables with their values. When this option is selected, the installer changes any strings in the text file that match InstallAnywhere variables to the values of those variables. |
|||||||||||||
Search and replace strings |
If you want the installer to search for specific text strings in the text file and replace them with replacement strings, select this option and then click Configure to open the Configure Search and Replace Strings dialog box. On the Configure Search and Replace Strings dialog box, click Add to define the Search For and Replace With text. When this action runs, the installer locates all instances of the Search For text and replaces them with their corresponding Replace With text. |
See Also
Customizing the Pre-Install Sequence
Adding Actions to the Install Sequence
Customizing the Post-Install Sequence
Adding Uninstall Categories and Actions to the Uninstall Sequence