Abdul-Rahman
Posts: 17
Joined: Thu Aug 02, 2018 7:30 am

Using files of the older version.

Tue Aug 14, 2018 7:50 am

Hi,
I am making a setup for a web application ,I also allowed the side by side installation of different products and I am using the customize dialogue to allow the user the choice of the installation type ,so say in V1.0 the user chooses to make a complete installation and in V1.1 he/she chooses to not install feature(1) but since it was installed in V1.0 I want to keep it and use it in V1.1 ,any suggestions and what does the "install if required" specifically do in the custom installation dialogue ?
Thanks ,
Abdul.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Using files of the older version.

Sat Aug 18, 2018 5:23 pm

Hello Abdul,

The "feature will be installed when required" option is intended to be used for advertised features. The installation resources of advertised features are not installed when the "feature will be installed when required" option is used. In this case the feature resources will be deployed on target machine when a product self-repair will be triggered, for instance through an advertised shortcut.

Now, getting back to your requirement, to preserve on upgrade a feature installation state even when the customer explicitly chose not to install it, you can try to develop two custom actions:

1. one custom action which will get the related feature installed state and set an installer property with a specific value
2. a second custom action which will set the feature installation state depending on the installer property specific value

The first action could be scheduled before "Wizard Dialogs Stage -> User Selection" actin group, while the second one could be scheduled after "Install Execution Stage -> Searches" action group.

Here are some article references which should be useful to read for getting a starting point for your custom action implementation:
1. How to set an installer property using custom actions
2. Session.FeatureCurrentState property
3. Session.FeatureRequestState property
4. MsiQueryFeatureStateA function
5. MsiSetFeatureStateA function

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”