I am wondering if the Cancel button on my welcome screen can exit the installer completely without showing the final “Abort Installation” dialog. I find this superfluous when the user has not yet started the installation.
I still want the dialog to appear if the user cancels the installation that is already running, but not if the installation has not been started (this happens if the Cancel button is pressed on the welcome screen).
I tried different things, but I lack an understanding of how the Windows Installer works in order to understand the solution.
Update: Got a job! I ended up using a combination of two sentences - I would like to give you both answers, but I will give it to the beam, since he has the lowest representative. But I will adore them. Here's how I did it (I'm still wondering if this works):
I used the Publish element as the suggested ray, but instead of triggering an event (there is no event called “Finish”), I set the “AbortInstall” property to 1 :
<Publish Dialog="SimpleDlg" Control="Cancel" Property="AbortInstall" Value="1">1</Publish>
I did this in my WixUI_Simple.wxs user settings file under Wix / Fragment / UI
Then, inside UserExit.wxs, I changed the value of InstallUISequence as follows:
<InstallUISequence> <Show Dialog="Simple_UserExit" OnExit="cancel">NOT AbortInstall = 1</Show> </InstallUISequence>
... is an idea suggested by Christopher.
Thanks to both of you!
source share