How to prevent installation exit dialog from showing when the user has uninstalled? [WiX]

StackOverflow https://stackoverflow.com/questions/22591126

  •  19-06-2023
  •  | 
  •  

Question

I have made a custom exit dialog for my installer. The problem is that it is shown when the user uninstalls the program, when I would like the default uninstall exit dialog to be shown instead.

My installer code is viewable at Github. I think the relevant code is:

        <Publish Dialog="KerkerkruipExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
        <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
        <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
        <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
        <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
        <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>

        <InstallUISequence>
            <Show Dialog="WelcomeDlg" Before="KerkerkruipWelcomeEulaDlg">Installed AND PATCH</Show>
            <Show Dialog="KerkerkruipWelcomeEulaDlg" Before="ProgressDlg">NOT Installed</Show>
            <Show Dialog="KerkerkruipExitDialog" OnExit="success" Overridable="yes" />
        </InstallUISequence>

        <AdminUISequence>
            <Show Dialog="KerkerkruipExitDialog" OnExit="success" Overridable="yes" />
        </AdminUISequence>
Était-ce utile?

La solution

You can have only one exit dialog for success. MSI doesn't let you have different success exit dialogs for different operations like install or uninstall. From the MSI SDK:

Each termination flag (negative value) can be used with no more than one action. Multiple actions can have termination flags, but they must be different flags.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top