Reputation: 1093
i have a code in MFC that is calling MsiInstallProduct(installerFullPath, commandLine);
is it possible to install 2 MSI products at the same time? as long as they are both independent.
is it possible to call a windows function and give it ALL of my MSI components and it will install them one by one?
Upvotes: 1
Views: 3213
Reputation: 11023
The multiple-package installation mentioned by Michael is exactly the support used by chained packages, and as he also mentioned this requires at least Windows Installer 4.5 on the target machines.
To create an MSI package in which you add the two ones as chained you can use different setup authoring tools, free and commercial, depending on the time you have available. Here is a list of tools: http://en.wikipedia.org/wiki/List_of_installation_software
Upvotes: 1
Reputation: 15905
Before Windows Installer 4.5, Bogdan's answer was correct. However since with Windows Installer 4.5 and later, you can perform a Multiple-Package Installation. Do this by callling MsiBeginTransaction, some combination of APIs such as MsiInstallProduct, MsiApplyPatch, or MsiConfigureProduct, and then finally MsiEndTransaction.
Technically these are still not exactly installed at the same time (and it will require calling multiple functions), but this makes them all part of one transaction. If all the participating packages are correctly authored, they will either all be installed, patched, or configured (modified or removed), or all rolled back to their starting state.
Upvotes: 4
Reputation: 11023
Windows Installer does not allow installing multiple MSI packages at same time.You need to trigger the installations one after another, waiting for the first one to finish before you launch the second one. The only option to install them in a single call is to create another MSI package, a main one, in which you add the two ones as chained packages.
Upvotes: 4