Thank you for sending the prompt reply! I tried this approach:
Any ideas on how to fix it?
project.Load += project_Load;
var msiFile = Compiler.BuildMsi(project);
static void project_Load(SetupEventArgs e)
{
Func<bool> checkSoftware = () => CustomActions.SoftwareInstalled(CustomActions.RemoteConnectorGuid);
if (e.IsInstalling)
{
if (checkSoftware())
{
e.Result = ActionResult.Success;
return;
}
var tempMsiFilePath = Path.ChangeExtension(Path.GetTempFileName(), ".msi");
var msiFileId = "RemoteConnector.msi".Expand();
e.Session.SaveBinary(msiFileId, tempMsiFilePath);
Process.Start(tempMsiFilePath).WaitForExit();
e.Result = checkSoftware() ? ActionResult.Success : ActionResult.Failure;
}
}
And the project_Load handler is raised after the progress dialog of main installer shows up and when remoteconnector.msi is called, windows spits the error:Another Installation is in Progress you must complete the installation before continuing this onewhich I guess fair enough.
Any ideas on how to fix it?