codewario
codewario

Reputation: 21418

How to piggyback an MSI installer within an MSI installer

This is my first time attempting to use Windows Installer to build a setup package (our client does not wish to use Wix, which I have worked with extensively). Currently I have an MSI that builds and works as intended. However, I need to add an installer for an SDK that is required for the program I have written to work on other machines. I have added the second installer (also an MSI) as a Custom Action which executes based on whether you tick a checkbox during the installation process. The problem is, when the second installer executes, I get the error that there is already a setup being run on the system and the installation cannot continue. How can I get around this? The custom action is set to run during Install.

Thanks in advance for any help in solving this problem.

Upvotes: 2

Views: 266

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

Setup Projects are notorious for the limitations and quality in authoring that they provide. So much that MSFT has removed them from Visual Studio 11 and replaced them with InstallShield Limited Edition.

Your best bet is to look into the setup.exe bootstrapper that Setup Project use. Take a look at the XML format that drives them and make your SDK installer a simple silent installer that can be driven by this infrastructure prior to the invocation of the main MSI that you are working on now.

InstallShield (Setup Prereqs and Suite Installers ) and WiX ( Burn ) would both be far more capable tools for this scenario.

Upvotes: 1

Bogdan Mitrache
Bogdan Mitrache

Reputation: 11013

You cannot have two MSI packages install at the same time, more specifically you cannot launch another MSI during the InstallExecuteSequence of another one. However, if you trigger your custom action in the UI sequence this is posssible.

Upvotes: 2

Related Questions