Reputation: 396
How exactly CANCEL button works in default installer UI?
If i click CANCEL button, some times i can able to see "do you want cancel setup" dialog box with yes or no options.
But some cases, this popup won't show up and installation continues.
I am seeing this problem, if i click CANCEL button at the end of first phase only. status message is "Coping new files".
"Coping new files" is deferred action. How come this message is showing in first phase?
Upvotes: 0
Views: 838
Reputation: 15905
Are you sure it's actually running the "Copying new files" action, or is it an action after that which doesn't post any progress updates? If it's a custom action, be careful that it does one of two things:
If the action never calls MsiProcessMessage, then Windows Installer will handle cancel for the action, but cannot cancel it in the middle of the action. If the action calls MsiProcessMessage (with certain values for eMessageType
), then Windows Installer assumes that the action will process the cancel, and the action must return ERROR_INSTALL_USEREXIT
or Windows Installer gets confused.
Upvotes: 1
Reputation: 21416
The execute sequence of an MSI installation process runs in two phases:
For example, the installation can no longer be canceled when commit actions start executing.
Upvotes: 0
Reputation: 30103
How exactly CANCEL button works in default installer UI? They are using multiple threads like BackgroundWorker in WindowsForms .NET. One thread for the UI and one for the installation, if you click cancel(UI), it will try to stop the other thread(installation) AT A CERTAIN POINT IN TIME.
Upvotes: 0