No announcement yet.

How to run an MSI before services start?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to run an MSI before services start?

    I need to install software (by running an MSI) before the installation installs and starts my application's services.

    I set it up like the attached photos, but it's not working.

    Click image for larger version

Name:	1.png
Views:	46
Size:	20.1 KB
ID:	308083
    Click image for larger version

Name:	2.png
Views:	49
Size:	16.4 KB
ID:	308084
    Click image for larger version

Name:	3.png
Views:	47
Size:	11.7 KB
ID:	308085
    Attached Files

  • #2
    You cannot have two Windows Installer processes at the same time. While one MSI package is being processed by Windows Installer, you cannot start the installation tasks of a new MSI - you may even get an error about an active install in execution when you try to do this manually. You can, however, process two or more MSI if you bootstrap them into an executable and install them in the needed order. Depending on what you need to install here, it might be possible that the publisher of the software published a merge module, which can be integrated into your own MSI, so while the merge module features all the actions and components required to install a certain tech, these things become part of your MSI when merged. When your package is uninstalled, these third party components are also removed.

    On the other hand, if you bootstrap the MSIs, then you need to remove both packages individually.



    • #3
      Okay, I found a template for the bootstrapper you might be interested in. I made this 10 years ago and published here somewhere, but I attached the zip file to this post again. Get this zip, and decompress the contents into the Templates sub folder of the Bootstrapper builder in the MSI Factory installation folder:

      Click image for larger version

Name:	SCRN-2022-01-27-01.png
Views:	130
Size:	32.8 KB
ID:	308091
      Once you start the bootstrapper builder, you will have a new template available, named "Extract and Run Multiple MSI Files", like so:

      Click image for larger version

Name:	SCRN-2022-01-27-02.png
Views:	30
Size:	16.7 KB
ID:	308092

      I have placed a few comments into the mainscript explaining how it should be used, if you have used the standard script once at least, you should not have any difficulties. The idea is that you include both MSI packages here, and run the package deploying the required technology before starting your own MSI. If it is a small component, you should be able to deploy it silently - perhaps you should check if deployment is actually required, just in case it was installed before.

      This all is, of course, only for the case that this thing you need to install before your own product does not come with a merge module option to be used in your MSI. I hope it helps.



      • #4
        Excellent! Many thanks!