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

Problems while installing a MSI from Basic MSI


3 replies to this topic

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 17 February 2006 - 07:04

Hi,
I am installing another MSI from my Basic MSI Project.

I have written a InstallScript for Installing the MSI and then calling this InstallScript function from a CustomAction.

I am using Deferred Execution because the path of the MSI is stored in the variable which gets processed in the Execute Sequence. I am using Synchronous Code(Ignores Exit Code). The Custom Action is called after "InstallFiles".

If in the InstallScript function I am installing this MSI silently with "/q" switch, nothing happens but iof I remove this switch then it gives the error "Another Installation is in Progress".

How should I do this. I have to install this MSI from my Basic MSI only and the path of this MSI is not known in advance to me.

What should be done. Thanx for all the help in advance. Its kind of urgent.

Swati.

KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 17 February 2006 - 15:21

Windows Installer does not allow two Execute Sequences to run at once. This means that you cannot start another MSI from the Execute Sequence of an MSI. (Unless you use nested MSIs, in which case the child becomes part of the parent and can only be upgraded or removed as part of the parent.)

What we did to get around this limitation was create a C++ executable that accepts parameters for the path of the second MSI and executes it using MsiInstallProduct. This executable is launched with an asynchronous custom action that is sequenced after InstallFinalize, so that the original MSI ends as the executable is launching, allowing it to start another MSI without interference.

Hope this helps
Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 20 February 2006 - 06:29

Thanx Kathy for the reply.

But is there any other way we can install another MSI without using the C++ executable. I am not sure that my client will agree to this solution as this will require adding an EXE to his setup. Also, this means that my base MSI will be executed first and after its completion my second MSI will be launched, which is not what we want.

Is there any way in which this can be achieved: Launching another MSI from the base MSI.

Please help. Its very urgent.

Thanx in advance for all the help.

Swati

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 February 2006 - 08:48

An executable to chain the instalaltions is the officially recommended and most reliable method.
Alternatives:

A) Place your custom action in the UI Sequence (scheduled for Immediate execution). However in this case your custom action will not run if the main setup runs in silent mode or in Basic UI mode, because in this case the UI sequence is completely skipped.

B) Use a "Nested Install" custom action. Note that nested msi custom actions are officiall deprecated but might be used in specific intranet deployment scenarios. You can find more information in MSI help.