1

Is it possible to do a dual listbox custom dialog with wixtoolset using a custom action?

I'm essentially trying to do this: https://www.advancedinstaller.com/user-guide/tutorial-combobox-listbox.html#combolist-scenario1

Half of the solution is here: https://www.firegiant.com/wix/tutorial/standard-libraries/custom-actions-and-user-interface/

I got my first listbox populated using WcaAddTempRecord (wcautil from wixtoolset sdk). The problem is that I can't get the second listbox to show the added data when "moving" a listitem to the second listbox. I even tried to publish the NewDialog event to show a second dialog with the same dual listbox controls, which seems to be the workaround proposed on various posts on this subject. No success there either; I just can't get the second listbox to show its content.

I did look at wixtoolset sources for an WcaAddTempRecord on a listbox but the only usage was commented out.

Any pointers?

KnightsWatch
  • 114
  • 6

1 Answers1

2

Dual Listboxes: Stefan Kruger - MSI MVP - has a great sample here: http://www.installsite.org/pages/en/msi/articles/MultiListBox/index.htm. Note that there are problems with MSI dialog events, so you need to actually use two dialog boxes to ensure proper dialog refresh. It is pretty clunky conceptually, but the sample is good.

Dark.exe: You can use WiX's dark.exe tool to decompile the MSI in Stefan's sample. You can then extract the dialog WiX markup and incorporate into your own WiX project. This is not trivial.

dark.exe sample: Below is a command line. Here is more (section 4).

dark.exe -x outputfolder MySetup.msi

Links (just for easy retrieval, the above links should do):

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thank you for your answer! I've come to realize that I was wasting time on trying to customize my dialogs using the native sdk; popping a C# Windows Forms Dialog is ways easier and allowed me to do exactly what I wanted. There is probable no reason to do it natively, in my case anyway. There are a lot of samples on CodeProject on how to do it with C# Windows Forms. – KnightsWatch Jul 17 '19 at 05:16