Thank you for reporting this.
You have just discovered the problem - canceling from Progress dialog doesn't work reliably. It does for native UI but not for managed one.
I assume you are using ManagedUI. At least it is what my testing shows that this problem happens with ManagedUI but not with native one.
ManagedUI is based on the "EmbeddedUI" hosting model implemented by MSI for the cases of completely custom UI. During the actual installation phase (when progress is displayed) the only interface UI has to the MSI runtime is the
The interface is very limited and it has no dedicated Cancel/Abort method thus Wix# simply returns
What is even worse is that when ProgressDialog is displayed the session handle is no longer valid so it's not possible to call
Saying that I have came up with the work around and it seems to work reasonably well. I will make it available very soon. Just as I finish the testing.
You have just discovered the problem - canceling from Progress dialog doesn't work reliably. It does for native UI but not for managed one.
I assume you are using ManagedUI. At least it is what my testing shows that this problem happens with ManagedUI but not with native one.
ManagedUI is based on the "EmbeddedUI" hosting model implemented by MSI for the cases of completely custom UI. During the actual installation phase (when progress is displayed) the only interface UI has to the MSI runtime is the
ProcessMessage
method of Microsoft.Deployment.WindowsInstaller.IEmbeddedUI
:publicinterface IEmbeddedUI { bool Initialize(Session session, string resourcePath, ref InstallUIOptions internalUILevel); MessageResult ProcessMessage(InstallMessage messageType, Record messageRecord...); void Shutdown(); }
MessageResult.Abort
from the first ProcessMessage
method after user clicks 'Cancel' button. Apparently this doesn't lead to the desired result.What is even worse is that when ProgressDialog is displayed the session handle is no longer valid so it's not possible to call
session.DoAction(<action that throws the error>)
to trigger rollback indirectly.Saying that I have came up with the work around and it seems to work reasonably well. I will make it available very soon. Just as I finish the testing.