Rizi
Posts: 15
Joined: Tue Oct 29, 2013 6:33 pm

Detection of a installed features by a previous verison

Hi,

i want to set up an UPGRADE of the installer for our product (therefore i set a new product code for a major upgrade etc.).
In the previous version of our product / installer also several features could be installed (depends on the selection of the user
during the installation).

What i want now by the new Installer is to perform a Custom Action ONLY in case of an UPGRADE installation AND ONLY when
a specific feature was installed by the previous version!

Therefore i selected for my Custom Action only the "Upgrade" checkbox under "Dialogs Stage Condition". And the additional
condition "!FEATUREIDENTIFIER=3". (3 = installed status locally)

I test the new installer on a machine where this feature was installed by a previous version. BUT the condition is not working! The
new installer is not able to detect this already installed feature.

I setup this Custom Action under the "Wizards Dialogs Stage" after the "Path Resolutions".

If i check the log file of the new installer i found this line at the beginning: "...Feature: FEATUREIDENTIFIER; Installed: Local; Request: Absent; Action: Absent".
There the previous installation is detected ("Installed: Local")!

Therfore i don´t understand why this detection is not working by using the mentioned condition!


Any help would be appreciated,
Thanks
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Detection of a installed features by a previous verison

Hi and welcome to Advanced Installer forums.
Therefore i selected for my Custom Action only the "Upgrade" checkbox under "Dialogs Stage Condition". And the additional condition "!FEATUREIDENTIFIER=3". (3 = installed status locally)
The above configuration sets the following condition for your custom action:

Code: Select all

( NOT Installed AND OLDPRODUCTS ) AND ( (!FEATUREIDENTIFIER = 3) )
Can you make sure that this condition is fulfilled when you try to install the new version? Also, can you please send me a verbose log of the upgrade so I can investigate it ant try to find the problem?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Rizi
Posts: 15
Joined: Tue Oct 29, 2013 6:33 pm

Re: Detection of a installed features by a previous verison

Hi,

thank´s for the reply. From my side it´s sure that an UPPGRADE installation is performed and that the feature (i want to detect at the beginning) is installed already
on the machine.

If i only check if it´s an UPPGRADE installation, it worked. Therefore the detection of the already installed feature fails!?

I have attached the verbose log file. The featureID i tried to detect (if ít´s installed by an older version) is "WebServiceDatabase".
My Custom Action ("SetProperty") is used to set an installer property (when the UPGRADE and the installed feature is detected).

Thank´s for any help!

P.S.:
As i mentioned, i placed the Custom Action in the "Wizard Dialog Stage". First, i tried to set the Custom Action in the "Install Execution Stage", BUT
then the value (updated by the Custom Action) was not pass through to the "Final Dialogs Stage"! I have tested this a lot of times!! Only when
i set the the Custom Action in the "Wizard Dialog Stage" to update the vaue, then i have also acces to this updated value in the "Final Dialogs Stage".
Is there a reason for that?! I used a global property.
Attachments
UPGRADE-INSTALLATION.zip
LOG - Upgrade installation - detection of installed feature fails.
(138.1 KiB) Downloaded 391 times
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Detection of a installed features by a previous verison

Hello,
If i only check if it´s an UPPGRADE installation, it worked. Therefore the detection of the already installed feature fails!?
Indeed, the "!FEATUREIDENTIFIER=3" condition will fail. This happens because when running the "MigrateFeatureStates" action Windows Installer set the features install states (of the previous version) as the current installation actions for their corresponding features. For example if a feature state in the previous version was set to 3 (is installed locally), then when running the upgrade version the "MigrateFeatureStates" action will set the above feature action to 3 (will be installed locally).

Therefore, in order to achieve what you want you should add your custom action after "Wizard Dialogs Stage -> Paths Resolution" action group and use a condition like this:

Code: Select all

&FEATUREIDENTIFIER=3
As i mentioned, i placed the Custom Action in the "Wizard Dialog Stage". First, i tried to set the Custom Action in the "Install Execution Stage", BUT
then the value (updated by the Custom Action) was not pass through to the "Final Dialogs Stage"! I have tested this a lot of times!! Only when
i set the the Custom Action in the "Wizard Dialog Stage" to update the vaue, then i have also acces to this updated value in the "Final Dialogs Stage".
Is there a reason for that?! I used a global property.
Please keep in mind this is the default Windows Installer behavior. A property value set in "Install Execution Stage" cannot be accessed within "Dialogs Stage".

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Rizi
Posts: 15
Joined: Tue Oct 29, 2013 6:33 pm

Re: Detection of a installed features by a previous verison

Hi Daniel,

thank´s a lot! Your advice worked for me.

Best regards
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Detection of a installed features by a previous verison

You're welcome.

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

Return to “Common Problems”