问题
I want to customize my installer to show custom dialog when previous version is already installed. After the welcome dialog user should see a custom dialog that says, "A previous version already exists do you want to continue". Any help is welcome.
回答1:
Check this document, to add Custom Dialog in standard WIX Dialogs.You can use Upgrade to find the previous version installed.
Set OnlyDetect attribute to yes, to avoid uninstall previous versions.
<Upgrade Id="{CE61D541-9988-4DA7-B748-7DF4355C6000}">
<UpgradeVersion Property="PREVIOUSFOUND"
Minimum="1.0.0" IncludeMinimum="yes"
Maximum="$(var.Version)" IncludeMaximum="no"
OnlyDetect="yes"/>
</Upgrade>
Use PREVIOUSFOUND property to publish the Previous Version exists dialog from Welcome Dialog.
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog"
Value="PreviousVersionDlg">PREVIOUSFOUND</Publish>
来源:https://stackoverflow.com/questions/16014082/custom-dialog-when-previous-version-exists