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

Adding modules to existing installation


4 replies to this topic

fredrik.strom

fredrik.strom
  • Full Members
  • 39 posts

Posted 20 December 2006 - 16:05

Hi

Im building an installation to a software product called X. Later i would like to install modules/pluggins to this product. The modules/products could contain new files/components and could also update existing components.

WHen a new version of X is installed the modules/plugins needs to be uninstalled.

Can this be done using Basic MSI projekts? Or do i need to switch to InstallScript?


I had a plan to use "patches" to solve the problem, but i would rather have that the modules are more independent if possible.

Is it possible to uninstall other installed products from within a Basic MSI project?


Regards F

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 21 December 2006 - 09:50

This will require careful design to work properly, but you can use separate installs for each plugin and this will work fine as long as they install files and registry entries that are NOT part of the original install. If there are shared resources between the setups you need to keep the component GUIDs consistent - this is best achieved using merge modules. Keep in mind that MSI will not overwrite an existing file if it has a higher version number than the one in the installer.

It is possible to uninstall other products from within a BasicMSI - this is done with the Upgrade table. See the SDK for exact documentation. This table should allow you to uninstall any existing MSI on the system before installing the new version.

So in summary:
  • Use separate MSI files (product, plugin1, plugin2). Use separate product codes but the same upgrade code for your setups.
  • Make sure each MSI is self contained and does not interfere with another, use merge modules for shared resources.
  • Use Upgrade table to uninstall required products.


Regards
-Stein Åsmul

fredrik.strom

fredrik.strom
  • Full Members
  • 39 posts

Posted 21 December 2006 - 10:13

Thank you very much for the answer, you just made my day :-).


Regards F


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 22 December 2006 - 00:15

Glad to hear it, please do report back any problems you are having with this. It is a common request and it would be good to gather all the data we can from your experiences.
Regards
-Stein Åsmul

fredrik.strom

fredrik.strom
  • Full Members
  • 39 posts

Posted 04 January 2007 - 10:05

The strategy seems to work almost perfectly:

The modules use the same upgrade code as the main product and when a new product version is installed the modules are uninstalled ok.

Just to test the senario that a module need to update a file included in the product installation i have used the same component code for these files.

However when the module is installed the file is not returned to the version used by the installed product. Other files/directories/registry entries used by the module are removed correctly.


Any ideas? I use the automation interface to build by releases so i would really like avoid the use of mergemodules.


regards F

Edited by fredrik.strom, 04 January 2007 - 10:06.