The following article uses options that are available starting with the Professional edition and project type.
In order to install two files with identical name in the same folder based on a condition, the following steps must be taken:
- Go to the Files and Folders page and select the folder that you want to hold the final file.
- In this folder create two sub-folders. For example: My_folder_1 and My_folder_2.
- In the first folder, My_folder_1, add the first file, Eula.rtf.
- In the second folder, My_folder_2, add the second file, Eula.rtf.
- Go to the parent folder, select the first sub-folder created previously (My_folder_1) and from the context menu select the Properties option.
- In the "Component" section of the "Properties" tab enable the Install folder content into the parent folder checkbox.
- Do the above step for the second folder.
- Go to the Organization Page and put each of the two files into a separate component.
- For each component, set the Install "Condition" based on which you want to install that file.
If you want to install a file based on a decision selected from the installer UI, be mindful that only public properties are passed from Wizard Dialogs Stage to Install Execution Stage.
This option is very useful if you wish to install a certain file, for example, based on the OS, and the file should have the same name for all versions. After the installation process is complete, the correct file will appear in the parent folder.
Below is a link to a short video depicting the steps explained in this article.