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

Howto: install a product two times on the same pc


6 replies to this topic

Joachim Krumnow

Joachim Krumnow
  • Members
  • 4 posts

Posted 03 June 2004 - 08:49

I have to write a setup that should install a product multiple times on the same computer. Each instance would use a different targetdir, different shortcuts and different registry keys.

Does anybody out there have an idea how to start? I even don't know whether msi setups can do this at all...

Many thanks in advance

Achim

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 June 2004 - 09:03

You could use different ProductCodes for the two copies. Either change the product code, or use a "multiple instance transform". The latter requires Windows XP SP1 or Windows 2003 and is documented in help topic "Installing Multiple Instances of Products and Patches"

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 03 June 2004 - 10:08

Stefan, I have a conceptual question about this issue. I have asked this in many places, but never got a good answer. In a scenario like this where you need a product installed multiple times, chances are some files will exist in both editions, but will be installed to different target paths (since each product has a different target path). I assume this means you need to change the component GUID for all files in addition to the product GUID (since the absolute path + file name is the primary key for a component)? The only exception I can see would be if you installed all shared files to a Common folder under the same base path, and then put product specific files in each new product folder. Maybe MSI 3 will have some new concepts here that I am not aware of?
Regards
-Stein Åsmul

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 June 2004 - 19:39

From the docs I'd say you don't have to change the component GUID, just make sure you install to a different folder.
QUOTE
To keep the files of each instance isolated, the base package should install files into a directory location that depends on the instance identifier. ...
The instance transform must change the product code and identifier for each instance. ...
If the instance transform installs files, they should be installed in a directory that depends on the instance identifier.



dtasanas

dtasanas
  • Full Members
  • 83 posts

Posted 03 June 2004 - 22:50

i have done this and all i had to change is the product GUID and destination folder. but of course i had to figure out a way of getting all the DLL's to play nicely with each other.

i had to write a script to unreg all the DLLs from one version and reg all the DLLs for the current version and visa versa.

is there a better way?
Don Tasanasanta[br]Configuration/Installation Eng

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 04 June 2004 - 01:26

I don't understand how it is possible to install a component to two different places with a different key path in both while retaining the component GUID. Here is a scenario:

You install the first product:
C:\1\File.exe, GUID 123

You install the second product:
C:\2\File.exe, GUID 123

Now you major upgrade product one. I believe the keypath for GUID 123 is now C:\2\File.exe? Where will windows installer install the file? And what will the keypath be after install? Maybe all componets are seen as: Product GUID + Component GUID, or the keypath is relative to the installation path for each product so it is really [INSTALLDIR]\File.exe for both products? I always thought key paths were absolute though?

I have always thought that keeping the component GUID and changing the key path was a way to move a file during a major upgrade (but will fail in all other upgrades).

Edited by Glytzhkof, 04 June 2004 - 01:30.

Regards
-Stein Åsmul

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 04 June 2004 - 03:16

To dtasanas: I assume these dlls you describe are COM servers since they need registration. Check out side-by-side and isolation concepts: http://msdn.microsof.../sidebyside.asp
Regards
-Stein Åsmul