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

Install modules (*.msm) in UI phase


5 replies to this topic

dorelsturm

dorelsturm
  • Full Members
  • 23 posts

Posted 06 July 2005 - 09:00

Hi,

I'm asking if this is possible in Basic MSI projects and how to do it.

I have a *.msm module that I need to install together with my installer. Everything is OK, I can install this module when I use the "default" stuff.
What I really want is to install this module during the UI phase and wait for this installation to finish before move to next dialog.
Here is the scenario:

- Install shows InstallWellcome dialog. User clicks Next
- Install shows a new dialog where a check box asks the user if he wants to install the module (my *.msm module)
- User clicks Next. If the check box is checked then the installer
installs the *.msm module and waits for it to finish
executes a custom action (call a function from custom DLL)
shows the next dialog
If the check box is not checked the installer simply shows the next dialog.

My question is possible to install *.msm modules in the UI phase and how to stop the execution until the module is installed?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 July 2005 - 14:12

By merging the msm to your setup it becomes an integral part of your msi, i.e. it simüply adds some components yuor your setup. All components are installed together during the exdcute sequence.

If you need to install something during the UI sequence (which in general is not an ideal solution) you would have to use a custom action to do that. Note that if your setup is executed in silent mode or with basic UI the UI sequence is skipped, so your custom action will not be called.

A better solution would be a launcher application that would run the two setups back to back.

dorelsturm

dorelsturm
  • Full Members
  • 23 posts

Posted 07 July 2005 - 08:20

Thank for the quick reply.

With adding a custom action to install the extra msm is clear. I found in InstallShield the Custom Action "New Nested MSI" (Inside this package) that I can execute (Synchronous of course) when the user clicks Next. However this custom action allows me to install a new *.msi installer and not an *.msm module. Should I create a complete new .msi installer that just contains my *.msm module?

Or it's better to add an InstallShield script custom action that calls an API (which one?) that installs the *.msm module?

This cutom action will be called also in the Execute sequence to be executed also when the installer runs in silent mode.

Thanks for your support.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 July 2005 - 09:54

MSMs are not installable, you would have to build a MSI that contains the MSM. Note however that nested MSI custom actions are strongly discouraged and are known to cause various problems. Again, I'd recommend a launcher exe instead.

dorelsturm

dorelsturm
  • Full Members
  • 23 posts

Posted 08 July 2005 - 10:18

Thanks for the reply.

You said nested MSI custom actions are causing problems. Is this then not working?

- create a custom action that calls a function in a DLL (stored in the Binary table in the .msi file)
- this DLL function executes code like this:

CreateProcess( NULL, "msiexec.exe /i mynew.msi", .....)
WaitForProcessTofinish.

In other words this DLL function launches an new instance of msiexec. Can this cause problems?


Using an executable that runs the two setups back to back is not a solution because the installer for our product should be delivered as one .msi file.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 July 2005 - 15:48

That would work (you could as well run msiexec as a EXE custom action directly). However you can only do this in the UI sequence (no two execute sequences can run simultanteously). This means that in a silent install your custom action won't fire.