PDA

View Full Version : Conflicting MSI installations



ablaze117
11-08-2013, 04:16 PM
I have a problem that I have been stuck on for awhile.

Basically I am creating an msi that, among other things, silently runs another exe (which itself is an msi) installer. My problem is, when my program runs this exe installer silently, it conflicts with my msi installer and errors out. To me it appears that since they were both created with InstallShield, the exe tries to execute but conflicts with my concurrently running msi and terminates.

The reason I believe this is if I set the exe to install asynchrnously, the installation will silently install after my msi just fine. The problem with this is that we are going to deploy this MSI package using the Windows Deployment System and I fear that when my MSI terminates, WDS will be unaware that the exe is still executing in memory and cause problems. I want the exe to completely install itself within my msi.

I have tried numerous execution methods in my custom action, but it all appears to come down to the fact that the exe will not play nicely with my msi if they try to concurrently execute. NOTE: I have tried waiting for an exit code from this exe as well with no luck.

Any ideas?

TsungH
11-08-2013, 05:24 PM
It is the behavior of Microsoft Windows Installer, not InstallShield. If you have not, please refer to _MSIExecute Mutex (http://msdn.microsoft.com/en-us/library/aa372909(VS.85).aspx) and Multiple-Package Installations (http://msdn.microsoft.com/en-us/library/bb736322(VS.85).aspx).

Evan Border
11-11-2013, 12:57 PM
I have a problem that I have been stuck on for awhile.

Basically I am creating an msi that, among other things, silently runs another exe (which itself is an msi) installer. My problem is, when my program runs this exe installer silently, it conflicts with my msi installer and errors out. To me it appears that since they were both created with InstallShield, the exe tries to execute but conflicts with my concurrently running msi and terminates.

Microsoft's Windows Installer technology will not allow more than one MSI to be modifying the computer concurrently. This is done so that proper rollback can be achieved in the event of user cancellation or fatal error. I am making the assumption that the particular error that you are getting on your second MSI is Windows Installer error 1500: "Another installation is in progress. You must complete the installation before continuing this one."

I want to point out that the error has nothing to do with the fact that both of the MSI's were created using InstallShield. No two MSI's, regardless of how they were made, will be allowed to concurrently modify the system. When an MSI runs there are two installation sequences that take place:
1. The User Interface sequence
2. The Execute sequence
It is when you are in the Execute sequence that you are prevented from running any other MSI's Execute sequence (Note: Windows Installer does not care how many UI sequences are running, as that part of the install is not meant to be performing any type of modifications to the system). This behavior is enforced by Microsoft so that the system is in a known state that can be reliably rolled-back to in the event that an error occurs or the user bails out and hits the cancel button. If things were allowed to devolve into an all out free-for-all, it would quickly become too messy to determine what changes to retain or undo.

You can work around this limitation by using what we call MSI Chaining. This can be accomplished from the Installation Designer tab's Releases view (it's under the Media group).
See the InstallShield help topic "Chained .msi Package Settings" for more information.