Hi ppl,

I have a custom action which launches an external application. When I try
to handle the exit code by showing a message with retry and cancel buttons,
if I press the Cancel, it throws an InstallCanceledException. Here is the
code:

Process process = Process.Start(processStartInfo);
process.WaitForExit();

if (process.ExitCode != 0)
{
session.Log(String.Format("CA [{0}]: {1}",
DateTime.Now.ToString("HH:mm:ss:fff"),
"Application exited with error code " + process.ExitCode.ToString() + "."));

Record recordError = new Record();
recordError.FormatString = errorMessage;

if (session.Message(InstallMessage.User | (InstallMessage)MessageIcon.Error
| (InstallMessage)MessageButtons.RetryCancel, recordError) ==
MessageResult.Retry)
continue;
else
return ActionResult.Failure;
}

What should I do to handle the Cancel in CA (not in installation scope)?

Thank you,
Marlos
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to