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

Multiple instances of a component.


1 reply to this topic

MikeW

MikeW
  • Members
  • 1 posts

Posted 26 February 2001 - 20:41

Hi,

I have a question about components that I can't find a clear answer to anywhere in the MSI or IS documentation:

"Each component can exist only once on a pc, and is represented by a GUID. So several features could use the same component. Even more, components could be shared among applications." (From "What Changes for Setup Developers" at www.installsite.org )

We have a family of 4 products.  The products are similar enough that we are considering combining them all into a single ISWI project and using "Release Flags" to build .  However I'm unclear on the implications of installing a single component multiple times in different locations.

Here's the scenario:

The four products (A, B, C and D) each have two components (A-Editor, A-Compiler, B-Editor, B-Compiler, etc.).  Given this fact it's a trivial matter to setup the components in ISWI and use release flags for the 4 different product.  However the situation is complicated because:

i)  While the compiler is different for each product, the editor is the same EXE.

ii)  It is very likely that customer will purchase and install multiple products.

iii)  We don't want sharing - if A and B are installed in different locations they must be completly independent, even though both products have the same editor EXE.

How will ISWI handle this - the edtor component has a single GUID, but may be installed multiple times in different locations.  What about uninstallation?

Sorry for the long post.  Thanks in advance for the help...

Mike W.


rmatheson

rmatheson
  • Full Members
  • 9 posts

Posted 13 July 2007 - 20:57

Mike,

I would recommend using different GUIDs. Whilst I have not tried your particular scenario, component rules would suggest that something like the following would occur:


Suppose Product 1 installed component A in C:\Program Files\Product 1. Windows Installer would record this.

Then suppose Product 2 is installed with the same version of Component A, but installs it to C:\Program Files\Product 2. Windows installer would record that Component A has been installed twice.

This is the dangerous bit - I'm fairly sure it only stores one installation location per component, hence when you uninstall both products, one component will be removed, leaving the contents of the other still installed, while windows installer believes all has been removed.

Look at

http://msdn2.microso...y/aa367849.aspx for when to change component GUIDs.