Install file conditionally from two source? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

stecy
Posts: 9
Joined: Wed Aug 29, 2012 3:22 pm

Install file conditionally from two source?

Using 9.4, I'm trying to setup the project to install one of two files into a target folder and AI keeps complaining there should not be duplicate file names in the target folder.

Here's my source layout (simplified), note that the file names are the same, only the folder is different:
C:\source\selection1\file.txt
C:\source\selection2\file.txt

I create two features in "Organization" and set the install conditions to be one of the two features depending on user selection.

I try to add the first file to the resources/application folder -- great, works.
Now, adding the second file to the resources/application folder -- already exists, do you want to replace it? Of course not!

I want only one of those files conditionally installed!

What am I missing there?

Thank you!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install file conditionally from two source?

Hello,

In order to achieve this you can follow our "Install files with the same name" article steps.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stecy
Posts: 9
Joined: Wed Aug 29, 2012 3:22 pm

Re: Install file conditionally from two source?

hmmm... that's what I tried initially but, maybe that's a bug, if you go to Deployment, select the file in the new component and look at the directory field you'll see that the name of the folder specified in the resources is present even though I specifically set the "Install content into parent folder" option on the folder...

Also, if I have two files with different names but I want to copy one of them but with the same target name, how should I do it?
For example:
file1.txt
file2.txt
One of them conditionally copied under file.txt. Also, the uninstall process must be aware of this.

Please advise.
Thank you!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install file conditionally from two source?

Hello,
hmmm... that's what I tried initially but, maybe that's a bug, if you go to Deployment, select the file in the new component and look at the directory field you'll see that the name of the folder specified in the resources is present even though I specifically set the "Install content into parent folder" option on the folder...
Please keep in mind this is the normal behavior. Your folder content will be conditionally installed into parent folder at install time.

Here's attached a sample, created with version 9.4 of Advanced Installer, which installs a file depending on user selection.
sample.aip
(14.23 KiB) Downloaded 459 times
Let us know if this helps, otherwise give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stecy
Posts: 9
Joined: Wed Aug 29, 2012 3:22 pm

Re: Install file conditionally from two source?

Thanks for the sample. Since our previous communication I've did just that with success.
However, I still think an improvement could be made to the display of the component properties (in Deployment/Organization) regarding the Directory field.
From your sample, it shows APPDIR\Folder1 for ReadMeEnglish.rtf and APPDIR\Folder2 for ReadMeFrench.rtf
Since the field is non-editable, may I suggest two things
  • Make the textbox background grey to show it's readonly (would apply to all of the other controls in the program...)
  • Show APPDIR only for the directory field since the files are copied to their parent. That would save anyone the uncertainty of the copy to parent feature working or not and preventing to do a test to see if the behavior is correct.
Thank you!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install file conditionally from two source?

Hello,

Thank you for your suggestions. We will add this improvement on our TODO list and it will be available in a future version of Advanced Installer.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install file conditionally from two source?

Hello,

This was fixed in version 9.7 of Advanced Installer released on November 29, 2012.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stecy
Posts: 9
Joined: Wed Aug 29, 2012 3:22 pm

Re: Install file conditionally from two source?

Excellent!

Thank you for the excellent support!

Return to “Common Problems”