I am wondering if it is possible to have the "Cancel" button on my welcome screen completely quit the installer without showing the final "Installation interrupted" dialog. I consider this redundant when the user hasn't even begun the installation yet.
I still want the dialog to be shown if the user cancels an installation that has already been started, but not if the installation hasn't been started (which is the case if the Cancel button is hit on the welcome screen).
I have tried various things but I lack a proper understanding of how Windows Installer works to fathom a solution.
Update: Got it to work! I ended up using a combination of the two suggestions--I wish I could give you both the answer, but I'll give it to ray as he has the lowest rep. But I'll upvote them both. Here's how I did it (I'm still surprised it works):
I used the Publish
element as ray suggested, but instead of invoking an event (there's no event called "Finish"), I set a property, "AbortInstall" to 1
:
<Publish Dialog="SimpleDlg"
Control="Cancel"
Property="AbortInstall"
Value="1">1</Publish>
I did this in my custom set file WixUI_Simple.wxs under Wix/Fragment/UI
Then, inside UserExit.wxs I modified the InstallUISequence as follows:
<InstallUISequence>
<Show Dialog="Simple_UserExit"
OnExit="cancel">NOT AbortInstall = 1</Show>
</InstallUISequence>
...which is the idea suggested by Christopher.
Thanks to you both!