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!

R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Adding files will cause the related feature being installed

Hey,

just a simple question, if I create a patch for an existing installer package and this patch will add new files into new components for an existing feature, then this feature will be installed on the client side.

If I try to install this patch without user interface (msiexec /p patch.msp /qb), a dialog is popping up and asking me for installation source (hence the original CD was removed). The reason for that is the installation for the feature:

Code: Select all

MSI (s) (88:84) [10:04:08:018]: PROPERTY CHANGE: Adding REINSTALL property. Its value is 'MainFeature'.
MSI (s) (88:84) [10:04:08:018]: PROPERTY CHANGE: Adding ADDLOCAL property. Its value is 'Feature1'.
While Feature1 was the feature which got a new file in a new component. The feature is not installed by default. If I add the file to the main feature, it doesn't hurt (because its already installed).

Why is the feature set to ADDLOCAL and how can I avoid that?

Thanks,

Roland
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Adding files will cause the related feature being instal

Hi Roland,

I've tested your scenario and, indeed, the modified feature is installed even if the "Not installed by default" option is set for it, however it seems that this is the way Windows Installer behaves in this cases.

In order to go around this problem you can go in the Organization page, select the feature you want and check the "Install based on condition" option for it. Then, in the "Condition" edit box write a false condition (i.e. 1=2). In this case the feature will be installed only if the user checks it manually (but this can't be done when patch is installed).

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
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Adding files will cause the related feature being instal

Hi Eusebiu,

well, I will try this out. Unfortunately, when creating a new version of the setup, I am not knowing yet when any optional features might get additional files in the future. Usually the developers notices, that there is something missing or we got new third-party-files we have to add to a certain optional feature. Such things could be fixed with a later released patch. I could set generally all optional features to install-based-on-condition with a false condition. This will give the user the same user experience as now, but avoid this auto-add of changed optional features with a patch. We will check that out.

Another idea: it came to my mind, to use a custom action to control this behavior:
I could create a custom action which runs only during patching and checks the feature installation state of a certain feature, and if the feature is set to Action=Local but State=Absent (and not Action=Reinstall) it could deselect this feature.

What do you think about this idea?

You can achieve a similar behavior, if you install the patch with:

Code: Select all

msiexec /p patch.msp /qb REMOVE=Feature1
The only difference is here, that the feature is uninstalled, nevertheless if it was installed before or not. But the custom action could check this and act as described.


Regards,

Roland
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Adding files will cause the related feature being instal

Hi Roland,
What do you think about this idea?
I think you can try this approach, but I didn't test it and I am not sure if it will work. However, as you mentioned, setting a false condition for the feature will give the user the same user experience as selecting the "Not installed by default" option, but the problem will be avoided.

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

Re: Adding files will cause the related feature being instal

Hi Eusebiu,
setting a false condition for the feature will give the user the same user experience as selecting the "Not installed by default" option, but the problem will be avoided
I will use this option in future version of our product. Thanks for your help!

Regards,

Roland
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Adding files will cause the related feature being instal

You're welcome. Glad to help.

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

Return to “Building Installers”