Search code examples
visual-studio-2015windows-installerinstallshieldsilent-installerinstallshield-le

How to Sequence the Silent Installer .exe file before installation of main application in Custom Action Sequence?


I am trying to Install a custom exe file before I Install main windows installer file.

I am using Install Sheild Limited Edition. After configuring everything I have sequenced my silent installer file at "After Register Product stage" of Custom Action and it gives me error 1618(which is another installation is in progress.) I got that the main installer is in progress so it is not allowing silent installer .msi to install, but don't know how to resolve this error.

But the issue is I am Selecting Source Location as "File Exist on Target Computer" and File Location as "INSTALLDIR".

Upon doing this I am getting an error 1618.

Can Anyone help me to resolve this?

The Code inside SilentInstaller.exe file is as below:

Process processObj = Process.Start("msiexec.exe", @"/i "folderpath\SqlLocalDB.msi" /qn IACCEPTSQLLOCALDBLICENSETERMS=YES");
                            //Loop until the process has exited
                            do
                            {
                                //refresh the process
                                processObj.Refresh();
                            } while (!processObj.WaitForExit(1000));

I have verified the path and everything but got struck in the sequence only.

Any Help will be much appreciated. Thanks.


Solution

  • Windows Installer enforces a mutex that prevents what you are trying to do. Since you are using InstallShield Limited Edition you can technically only use the PRQs that they provide. However if you put InstallShield Pro/Prem on a VM you can use it to generate a PRQ file then bring that into your Limited Edition project. This will cause the setup.exe to run the MSI before it runs your MSI thus avoiding the mutex.

    http://blog.iswix.com/2006/11/using-installshield-12-to-install-net.html