-
I have a long running custom action in C# and it is done in several steps so I use I have to put the MSI into a bundle that doesn't show the MSI UI. Now clicking cancel on the bundle UI stops the install but allows the custom action to complete all steps. Is is possible to get the bundle to cancel the custom action? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes. If your BA responds with cancel on the progress and MSI callbacks, that should work. |
Beta Was this translation helpful? Give feedback.
Thanks @robmen, you've helped me answer my own question.
Knowing it should work made me investigate the ProcessMessage documentation. Now in my C# custom action I set the record of the message to make it "Explicit"
`var recordProgress = new Record(3);
recordProgress.SetInteger(1, 1);
recordProgress.SetInteger(2, 1);
recordProgress.SetInteger(3, 0);
session.Message(InstallMessage.Progress, recordProgress);`
and clicking the cancel button in the bundle UI does indeed cancel the action.