Guidance on Creating Install Flavors

Got a problem you cannot solve? Try here.
Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Guidance on Creating Install Flavors

Postby Sheri_Steeves » Fri Jun 12, 2020 11:06 am

Hello,

I need to build installers for three flavors of our products - trial, subscription, single install. Only one flavor of each product can be installed on a machine at a time, i.e subscription should detect and remove trial or single install, trial should detect single or subscription. And each install should detect and uninstall itself..

I don't think I can use Product codes to enforce this as I can only detect "updates" for a single product code, and I need the revision code to handle updates to each product line.

I am thinking that I will need to add code to my MSI script to detect the previous installs and prompt the user to cancel or allow the product replacement. Is there another way to do this?

Also, is there a way to add the uninstall of the previous product as a "Prerequite" step instead of making the user go to the Control Panel and remove the product themselves?

Would the NATIVE ENGINE give me more control than the MSI installer?

Thanks

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Guidance on Creating Install Flavors

Postby FrancescoT » Fri Jun 12, 2020 11:57 am

A question, do you want to manage each one of your flavors as a distinct and stand alone product?
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Guidance on Creating Install Flavors

Postby Sheri_Steeves » Fri Jun 12, 2020 1:26 pm

At first I thought they would be, now, you seem to be suggesting, I'm wondering if the flavors can be all built off the same install using the same Product code. Then a single install would detect the trial or the subscription being installed.

I would however, also need to detect someone trying to install an updated single install over a later or previous version subscription.

I would want different text displayed on the install screens for each flavor, as well as in the Add/Remove programs. I might be able to do this using compiler variables?

I'm just starting to build up the new install right now. If you think this can be done using this approach, or have a better one, let me know.

Thanks for the quick answer.

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Guidance on Creating Install Flavors

Postby Sheri_Steeves » Fri Jun 12, 2020 1:49 pm

I should also mention that in the past, once I've created the install projects, all of my install are build via the command line, passing in any compiler variables I needed to customize things like version numbers.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Guidance on Creating Install Flavors

Postby FrancescoT » Fri Jun 12, 2020 1:50 pm

I was thinking that you may have a stand alone installer for each one of your flavors, and then you may have a setup wrapper which doesn't install anything, but it only runs the embedded flavor installers on the base of the user selection.

However doing in this way, you will have a different PRODUCTCODE for each one of your flavors, and I am not sure if this may be problem for you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Guidance on Creating Install Flavors

Postby Sheri_Steeves » Mon Jun 15, 2020 10:09 am

I looked at using the same product code for all my flavors and using persistent variables to be able to determine what was installed but persistent variables do not maintain across updates (revision code changes) within a product code.

I'm back to three separate mutually exclusive product codes and three installers. I know I can check for the other flavors manually by using the product code and checking the registry key.

Can I use the prerequisite list to uninstall the other flavor?

Another option i'm looking at is a variation of what you had said about giving the user a choice of the flavor upon the install, but using a single product code - I think this is similar to what the IA installer already does.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Guidance on Creating Install Flavors

Postby FrancescoT » Mon Jun 15, 2020 1:52 pm

If you want to use a unique PRODUCTCODE for all your flavors, you may assign a feature to each one of your flavors.
https://www.installaware.com/mh5/desktop/visualfeatures.htm?rhsearch=features&rhsyns=%20.

If you want to keep track of installed features across updates, here there is a sample project that demonstrates exactly this (Features sample (2)).
https://www.installaware.com/forums/viewtopic.php?f=2&t=6772

Can I use the prerequisite list to uninstall the other flavor?

I'm not sure to follow, what do you mean exactly?
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Guidance on Creating Install Flavors

Postby Sheri_Steeves » Thu Jun 18, 2020 2:19 pm

Still trying to get this to work.

What I have now is a single project with a Default Features that includes my application files, and a feature for each of my flavors with a configuration file that controls the product flavor. This configuration file has the same name for each flavor, just different contents.

I'm using a compiler variable to store the installer's build flavor, and saving the "last run" build flavor into a registry key (this is part of the Default Feature section) at the end of the successful install.

When I build the install, the compiler variable controls which Flavor Features are turned on. I build it 2x, once for Subscription, and once for Single, changing the variable in between. Both setups have the same ProductCode and RevisionCode.

If I install the Subscription - everything is correct.

Then, to change to a Single install, I run the other setup. It has the same productcode\revisioncode so it enters Maintenance. I read the registry to check if I'm changing flavors, and select/deselect the appropriate flavor features in the MSICode myself. I also set the MODIFY=TRUE, REPAIR=FALSE and REMOVE=FALSE as technically I am modifying.

To confirm that I was setting the features correctly, I displayed the components dialog and it shows the correct features.

The Default feature is always selected, and it to run through each section in the First Time / Maintenance section. I put up message boxes to make sure but nothing is changed on disk, and my registry key isn't updated.

Programs and Features is getting updated with the single install, this I can see if I try to uninstall.

Why would my files and registry keys not get updated? I only need to replace a single file and update one key.


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 55 guests