skipau
Posts: 31
Joined: Mon Feb 22, 2010 5:12 am

Duplicate file installation and feature modification

Hi there..

I am having a little trouble with a files getting removed when modifying what features are installed. I am using Enterprise edition 9.2.

Basically I have an MSI with multiple features. FEATURE A, FEATURE B and FEATURE C.
FEATURE A and FEATURE C actually install some of the same files in the the APPDATA folder - lets say FILE X and FILE Y. To do this I have the duplicate files in separate folders under Application Folder and have set the "Install folder content into the parent folder".

A client would either select FEATURE A or FEATURE B and what I want to do is make it so that FEATURE C installs FILE X And FILE Y only when FEATURE A is not installed (that is because FEATURE B doesn't include those files and FEATURE A does). It is also possible though for FEATURE A and FEATURE C to be installed together, so when that happens I don't want FEATURE C to install the FILE X and FILE Y as they are included in FEATURE A.

Anyway... so with the basics set above things would work fine because FEATURE C just installs all the files no matter what (no conditions set yet). The problem would come when I use Maintenance to remove one of the features. What happens is if they remove FEATURE C then the files are removed that it installed - also removing the ones that are in the FEATURE A which are the same. Doing a REPAIR after this will put the FEATURE A files back in.

So to work on this I though that I would put a condition on the duplicate files installation in FEATURE C so that they only get installed when FEATURE A was not selected. I tried (&FEATUREA<>3 OR !FEATUREA<>3) on FILE X and FILE Y components. My thinking being that if FEATURE C is selected then it would only install the FILE X and FILE Y if FEATURE A wasn't being installed OR if FEATURE A wasn't already installed and then if I removed FEATURE C, FILE X and FILE Y (as installed by FEATURE A) would stay.

That isn't working for me. I think because perhaps (&FEATUREA<>3 OR !FEATUREA<>3) is not achieving what I want and it probably my understanding of feature conditions that is causing the problem.

Can anyone provide any advice on what I can do here?

thanks in advance!
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Duplicate file installation and feature modification

Hi,

This is much simpler to implement, without being required to add duplicate files into your project, so you can delete those from Files view.

Now, in Organization page all you have to do is to share the components of the two files from feature A in feature C, so they get installed if at least one of the features
gets installed and will get removed only when both of them are removed.

To share the components just press SHIFT key and drag them under feature C.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
skipau
Posts: 31
Joined: Mon Feb 22, 2010 5:12 am

Re: Duplicate file installation and feature modification

Bogdan to the rescue!!! and my poor knowledge of MSIs and Advanced Installer pointed out to me again!

Thanks heaps for the quick response!
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Duplicate file installation and feature modification

Always a pleasure.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Duplicate file installation and feature modification

Ah, by pressing Shift key it works.

Thanks, that's what I needed to know.

Regards,

R.Mueller

Return to “Building Installers”