I have created an C# application that installs MSI's by calling Installer.InstallProduct. I have set the application to be the "external UI" by calling Installer.SetExternalUI and passing an ExternalUIHandler
. The MSIs are set to install silently.
Here's my code:
Installer.EnableLog(InstallLogModes.Verbose, "install.log", true, true);
Installer.SetInternalUI(InstallUIOptions.Silent);
Installer.SetExternalUI(OnUIUpdate, InstallLogModes.Progress);
using (Transaction scope = new Transaction("Transaction1", TransactionAttributes.None))
{
foreach (string msi in Installers)
{
Installer.InstallProduct(msi, "");
}
}
Question:
How do I send a "CANCEL" message from an external UI using DTF to cancel the on-going installation?