How do I customise the Wix Progress Dialog?

[亡魂溺海] 提交于 2019-12-06 02:12:27

问题


I'm trying to customise the standard WiX Progress Dialog (I want to make it show the ActionData). I've followed Neil's guide to customising dialogs but the trouble is, the original ProgressDlg is still being shown instead of mine.

I think I know why: if you look at the source to ProgressDlg you can see this block of code:

   <InstallUISequence>
    <Show Dialog="ProgressDlg" Before="ExecuteAction" />
  </InstallUISequence>

So rather than being published by another dialog, as most dialogs are, it is being triggered directly as part of the InstallUISequence. So how do I override this?


回答1:


It seems that the progress dialog must be the last thing in the InstallUISequence before ExecuteAction - otherwise, because Progress Dialogs are modeless, it is shown then hidden straight away.

My solution therefore is just to make sure that my custom progress dialog is shown after the existing one:

  <InstallUISequence>
    <Show Dialog="CustomProgressDlg" After="ProgressDlg" />
  </InstallUISequence>



回答2:


@Samuel, it is working as Bob said: "As long as you don't reference ProgressDlg" but this statement is not precise. You need to find all references to ProgressDlg, but find them in the WiX sources. Then you need to create your own version of any dialog which references the ProgressDlg and is included by your setup (direct or indirect use of it!), in order to make it also reference your customized dialog.

I have tried this to solve the same issue. For using eg. the FeatureTree UI Sequence you would have to create your own versions of the following dialogs in addition to the ProgressDlg:

  • MaintenanceWelcomeDlg
  • ResumeDlg
  • WelcomeDlg

This is because they define a Show element which is referencing ProgressDlg.




回答3:


ProgressDlg is scheduled only when you refer to it. If you want to replace it, customize your dialog sequence to not refer to ProgressDlg.




回答4:


@Klaus, fortunately you don't have to re-create your own versions of the dialog with v3.11.1. In the InstallUISequence, you can override the dialog sequence e.g.

<Show Dialog="WelcomeDlg" Before="ProgressDlgCustom">NOT Installed OR PATCH</Show>

Make sure you omit the Show/@override - this was the exact condition from the WelcomeDlg.



来源:https://stackoverflow.com/questions/3422717/how-do-i-customise-the-wix-progress-dialog

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