custom dialog when previous version exists

旧时模样 提交于 2020-01-03 03:09:08

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!