This article discusses how to associate a Rule Expression to a File extension and describes how to automatically associate the Rule Expression to a file whenever a file with that File Extension is added to the project.
This article outlines the steps necessary to associate a Rule Expression to a File Extension. When a Rule Expression is associated with a File Extension, all the files with that extension in the Project will have the Rule Expression applied.
Here are the steps for applying Rule Expressions to File Extension:
Navigate to InstallAnywhere Designer | Sequence | Install | Add File and add few .txt Files .
Navigate to Project | Manage Expressions and Click New Expression
Add Rules to the Expression by Clicking ‘Add Rule’
In the ‘Associate Expression to File Extensions’ section, Click Add . ‘Choose an Expression’ dialog appears.
Select the Expression that you want to associate to a file extension and then Click Load.
Double Click the File Extension section in the same row where the expression has been added, and enter the name of the file extension, .txt for text files (or .sh for Linux shell executables files ).
Click on Apply button. ‘Apply Expression’ dialog will be shown. Click ‘Yes’ to apply the expression. The files in the project that contain the file extension you have specified will be updated to have the rule expression applied to them.
‘Apply automatically when new files are added’ Check box can be Enabled to automatically associate the Rule Expression to a file whenever a file with that file extension is added to the project on the Sequence page.
Navigate to Sequence | Install . All the text files added to be deployed to the target system will be marked with the Rule Expression applied.
Note : To disassociate an associated Rule expression from file extension, in ‘Associate Expression to File Extension’ section, disable “Apply” checkbox in the expression rows and Apply.
This Feature is available in InstallAnywhere 2017 & later versions.