cfs80
Posts: 27
Joined: Tue Mar 30, 2010 9:10 am

Conditional file install based on files date

Hi

I would like to do a conditional file install of either of two files with the same name. I know about this: http://www.advancedinstaller.com/user-g ... -name.html
Lets say I have three files with the same name A1, A2, A3.
A3 is the file that is presently installed. How do I condition it so that if the file that is presently installed (A3) is newer than file A2 then the file A1 will be installed else the file A2 will be installed (All files has the same file name).

Thanks :) !

Brgds
Christian
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Conditional file install based on files date

Hi Christian,

In order to achieve what you want you can follow the steps below:
- go in the Search page and create to "File version" searches using the "Extended Search" toolbar button
- in the "File to Find" text field of the first search write the path to the file A2 and rename the search, for example V2
- in the "File to Find" text field of the second search write the path to the file A3 and rename the search, for example V3
- go in the Organization page and move the files A1, A2, A3 in different components
- select the component that contains the file A1 and set the following condition for it: V3 > V2
- select the component that contains the file A2 and set the following condition for it: V3 < V2
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cfs80
Posts: 27
Joined: Tue Mar 30, 2010 9:10 am

Re: Conditional file install based on files date

Thanks Eusebiu, I will try that!

Brgds
Christian
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Conditional file install based on files date

You're welcome. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”