5

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?

Thiem Nguyen
  • 6,345
  • 7
  • 30
  • 50
Samuel Jack
  • 32,712
  • 16
  • 118
  • 155

4 Answers4

4

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>
Samuel Jack
  • 32,712
  • 16
  • 118
  • 155
  • 2
    you can replace references to ProgressDlg with your own CustomProgressDlg. Or edit the existing ProgressDlg. – Alexey Ivanov Mar 22 '11 at 19:51
  • InstallUISequence> Why this code mentioned above is not working? – DTdev May 21 '13 at 15:08
  • This is a good workaround but hardly a proper solution. The solution is to get rid of all references to ProgressDlg. In order to do that, corresponding dialogs like WelcomeDlg, MaintenanceWelcomeDlg and ResumeDlg should be redefined with your own copies. – ogggre Nov 18 '19 at 16:14
3

@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.

Klaus
  • 31
  • 1
2

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

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • isn't it the case that, because the WiX UI Extensions include a reference to ProgressDlg in the InstallUISequence (as I showed in my question) the only way I could avoid referencing it is to not use the UI Extensions? – Samuel Jack Aug 09 '10 at 08:20
  • As Neil's blog post shows, you create a new fragment that has its own DialogRef to ProgressDlg; just replace it in your custom fragment. As long as you don't reference ProgressDlg, its InstallUISequence scheduling won't be included. – Bob Arnson Aug 09 '10 at 14:22
  • you've described the way I thought it should work: I've cloned WixUI_Adv and removed all DialogRef's to ProgressDlg. I've done a search in my project to check there are no other references to ProgressDlg - but still it ends up in my MSI :-(. Any chance that this might be a bug in Wix (I'm using 3.5.1804)? – Samuel Jack Aug 09 '10 at 15:30
0

@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.

Geoff
  • 81
  • 6
  • This still makes ProgressDlg to leak into resulting MSI (probably due to omission in WiX Linker). – ogggre Nov 18 '19 at 16:18