Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Disable Features in upgrade


2 replies to this topic

StYerk

StYerk
  • Full Members
  • 33 posts

Posted 23 May 2005 - 16:02

Hi,

I am trying to author an upgrade for my setup (DevStudio9, Basic MSI).

The setup contains a subfeature that is supposed to install a customer speficic
configuration area at initial installation only.

In an upgrade, this feature is supposed to be left alone, i.e. it's install state
may not change, since in that area the customer keeps his customization
and this may not be overwritten. That means, it may not be updated, but also not be removed.
(The user may select/deselect the subfeatures parent at initial install, so it may/may not be installed)

How can I do this???

I have tried to conditionally set the Install Level of the feature to 200 if IS_MAJOR_UPGRADE is set (INSTALLLEVEL is always 100), but the upgrade ignores this. Does the Upgrade use INSTALLLEVEL at all?

I cannot use MsiSetFeatureState, since it can only set to 'Local', 'Remove' or 'Advertise'; none of these are an option, Local would overwrite it, that's exactly what I need to avoid, 'Remove' would remove it that is as wrong as the other, and advertising is not used in our installation.

Please help me, I am slowly going nuts with this upgrade stuff....
blink.gif

Regards,
Jörg



StYerk

StYerk
  • Full Members
  • 33 posts

Posted 10 June 2005 - 09:26

OK, my solution:

I set the installlevel of the feature to 0 in case of the upgrade/patch;

This seems to be the only way that the installlevel gets accounted for.

However this also leads to problems:
The feature will not be installed at all in that case; that means in a major upgrade the installer will recognize the feature as installed in the previous version, but absent in the newer version; thus it will UNINSTALL the feature during the upgrade;

In my case this is a no-no, because it contains customer specific data.
I help myself by copying the files aside (by an installscript custom action) before anything happens and afterwards restore the files.

Future upgrades will then simply ignore these files since they are no longer accounted for as an installed feature; they are just files lying around and (hopefully) left alone.

But I still do not understand in which cases the installlevel setting conditions of a feature are accounted for and when not...
I have seen that mostly a feature's installllevel set by a condition is not accounted for. Seems like a bug to me (in installshield or in MSI installer, I don't know).


Just wanted to let ppl know this, in case anyone reads this....

Regards,
Jörg



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 10 June 2005 - 16:26

InstallLevel is not the right thing to achive your goal. Instead, set Never Overwrite=yes for these components.