Wix CustomAction [C#] session.Message(Messagebox)
is not displayed during installation.
I have a Session.Message added in my custom action,
public static ActionResult DisplayConfirmationMessage(Session session) {
Record record = new Record();
record.FormatString = pMessage;
Session.Message(InstallMessage.Error
| (InstallMessage)System.Windows.Forms.MessageBoxIcon.Warning
| (InstallMessage)System.Windows.Forms.MessageBoxButtons.OK, record);
}
And in wxs file custom action
<CustomAction Id="RestartAction" BinaryKey="CustomActions" DllEntry="DisplayMessage" Execute="immediate" Return="check" />
and in install execute (only one custom action call):
<InstallExecute>
<Custom Action="RestartAction" After="InstallFinalize"></Custom>
</InstallExecute>
the message box is displayed only at time of uninstall. But during installation it is getting logged to session.Log.
I have checked with 'NOT Installed AND NOT REMOVE' still same results.
I am blocked on this, please help.
Thank you in advance.