Hello,
I have really appreciated your help over the last few day.
I am really glad I could help!
Most of what you want to achieve is possible with our predefined support. Please allow me to explain how this can be achieved:
Let's start with the beginning. In the
"Files and Folders" page, please create two folders under the
"Temporary" folder.

- TEMP.png (47.36 KiB) Viewed 11534 times
Now please click on the first folder -->
"Add Temporary Files" button from the ribbon. Now please add the first version of your file.
Now please click on the second folder -->
"Add Temporary Files" button from the ribbon. Now please add the second version of your file.
Now that the files are added, if you double click on the file, you will notice that it has a property assigned to it. This property stores its path (we will need this a bit later).

- SampleOne.png (70.89 KiB) Viewed 11534 times

- SampleTwo.png (73.75 KiB) Viewed 11534 times
You have mentioned that you want the files to be installed based on a RadioButton control. With that being said, we need to add a "Radio Button Group" control to one of our dialogs. To do so, please:
- go to
"Dialogs" page, select one of your dialogs (e.g.
"WelcomeDlg")
- in the ribbon, please click on the
"Controls Toolbox" button
- from the list, select the
"Radio Button Group" control and add it to your dialog.
- now, if we click on the control, we will see that it has a property assigned to it as well. This property stores the state of the control (e.g. which radio button was selected)

- RadioButton.png (164.43 KiB) Viewed 11534 times
If you click on each radio button, you can see the values that the
"RADIOBUTTONGROUP_1_PROP" property can take:
RadioButton_1
respectively
RadioButotn_2

- RadioButtonVal.png (151.15 KiB) Viewed 11534 times
Now, normally, we should achieve what we want through a
"File Copy/Move" operation. However, this is not possible, because the destination file name can't be the same for two operations.

- FileCopy.png (196.38 KiB) Viewed 11534 times
In the above screenshot you can see how a
"File Copy/Move" operation looks like. As you can see, it has, as parameters, a source file and a destination file. The destination file name is actually the name of the copied file.
As you can imagine, in our scenario, we would need two such operations. The thing here is that, unfortunately, the destination name can be the same for two operations.
With that being said, we can not use our predefined support for this task. However, this is possible through a custom approach (a custom action) - e.g. a script.
For this, we can use a script (e.g. PowerShell, VBScript) that will copy our file from the temporary location to our application directory (APPDIR) based on the radio button selection. Here is how the script could look like:
Code: Select all
# Block for declaring the script parameters.
Param($appDir, $sampleOne, $sampleTwo, $radioButton)
# Your code goes here.
# based on the radio button selection, we copy our files from the temporary location to APPDIR
if ($radioButton -eq "RadioButton_1"){
Copy-Item -Path $sampleOne -Destination $appDir
}
elseif ($radioButton -eq "RadioButton_2"){
Copy-Item -Path $sampleTwo -Destination $appDir
}
To implement this in Advanced Installer, please go to
"Custom Actions" page. Here, please add a
"PowerShell inline script" custom action,
with sequence.
In the end, the script should look like this:

- FinalScript.png (105.53 KiB) Viewed 11534 times
Some information about the
"Copy-Item" PowerShell cmdlet can be found here:
https://docs.microsoft.com/en-us/powers ... wershell-7
This way, based on the Radio Button selection, one of your files will be installed.
Also, temporary files are deleted at the end of the installation ---> none of the files will be found on the target machine (in the temporary location) after the installation - only the copy filed will be found.
Hope this helps.
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging