borrbr
Posts: 3
Joined: Thu Aug 24, 2023 1:54 pm

Installation with user's choice

Hi

I'm creating a project for a files installation.
There is a file that will be copied according to the user's choice.
The user chooses the country of installation and the file for his country is copied from a shared folder.
But during installation, these files are not copied.

Here's how I set it up

Properties
  • Share : a folder containing the files to be copied (file_FR.txt ; file_CN.txt ; file_PL.txt)
  • SITE : FR (by default)
Dialog
  • Radio button group :
    - With 3 choices FR; CN; PL
    - Property name : SITE
    - For the France radio button : Value = FR
    - ...
Files and Folders
  • A folder "property based" : Share
  • One folder FR, one CN and one PL : "Install folder content into ..."
In each folder one file :
- New file operation ; Copy/Move
  • Source File
    - Name : the original name of my file : file_FR.txt
    - Folder : Share
  • Destination File
    - Name : file.txt
    - Folder : APPDIR\...\FR
  • Properties
    - Component : Files
    - Execute on : Component installation
    - Condition : SITE = "FR"
    - Operation : Copy

Idem with CN and PL with the corresponding parameters.

What am I doing wrong?

Thanks a lot
Attachments
Test.aip
My test project
(19.04 KiB) Downloaded 92 times
Liviu
Posts: 1054
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Installation with user's choice

Hello and welcome to our forums,

Please note the File Copy/Move operation is intended for files outside the package only. If you need to duplicate files included in the package, you can use a file duplication operation instead.

However, there is no need for the duplicate operation.

1. You just need to add the files as regular files in the desired folders and condition their component.
files.png
files.png (25.15 KiB) Viewed 3216 times

2. Use the F8 or the Go to Component toolbar option after you select the file that you conditionally want to install.

3. Condition the component installation through the Condition field from the Component properties.
file condition.png
file condition.png (45.84 KiB) Viewed 3216 times

Attached you can find your modified sample project. You can also check the Conditionally copying installed files to APPDIR based on installation language forum thread which debates the same scenario.

Let us know if you have any questions.

Best regards,
Liviu
Attachments
sample.zip
(4.51 KiB) Downloaded 96 times
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
borrbr
Posts: 3
Joined: Thu Aug 24, 2023 1:54 pm

Re: Installation with user's choice

Hi Liviu

Thanks a lot, I will try this.

Regards
borrbr
Posts: 3
Joined: Thu Aug 24, 2023 1:54 pm

Re: Installation with user's choice

My files are outside the package.
These files are located in a shared folder on the server.
Liviu
Posts: 1054
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Installation with user's choice

Hello,

The files need to be included in the package in order to be installed by your setup. You can try using the Synchronized Folders feature.

If that does not help you and you need to duplicate files included in the package, you can try using a file duplication operation instead of the File Copy you used.

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”