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

Major Upgrade - Registry


3 replies to this topic

cherukus

cherukus
  • Members
  • 68 posts

Posted 05 March 2004 - 18:08

Is there a way to specify not to remove the registry entries when doing an major upgrade. Registry entries should only be removed when the user uninstalls the App.
My Major upgrade, is set to uninstall all the components and install the new components, but this is deleting all the user preferences stored in the Registry with which the user's are not happy about.

Appreciate any comments/suggestions.

Cheers !!!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 March 2004 - 17:12

If you select so, the major upgrade will perform an automatic silent uninstall of the previous version forst, thus removig all files and registry entries.
Move your RemoveExistingProducts action to a higher sequence number to avoid this.

cherukus

cherukus
  • Members
  • 68 posts

Posted 14 July 2004 - 20:28

I moved the RemoveExistingProducts sequence to be after InstallFinalize, but still my Registry entries are getting set to the default in case of a Major upgrade.



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 15 July 2004 - 04:23

Normally what you do to prevent this problem is to put all registry keys in a separate hidden feature that is not installed again during a minor upgrade or major upgrade:

Minor upgrade: when installing the update you exclude the registry feature from the REINSTALL property.

Major upgrade: you conditionally exclude the feature from installation if the UPGRADINGPRODUCTCODE is set (I have never tested this, and it may require some tweaking).

However, in your case this trick probably won't work if your app is out in the wild. What you could do is to have your setup rename the registry key where the values are, and then rename them back after the install (you need to delete the default values your setup created, AND you need to condition this rename to happen only if the install is an upgrade). There is also a way to export a *.reg file and then import it after the install has completed. If you prefer this approach I have posted a description of how to do it several times (please search for it).

Edited by Glytzhkof, 15 July 2004 - 04:25.

Regards
-Stein Åsmul