I'm using Windows Installer 4.5 new features and WiX to generate MSI packages.
I have created an MSI chain installation in order to install a collection of other MSI packages as a transaction. Each package is using the new Embedded UI option so the UI can be WPF. Everything works OK this far.
Except one of the goals would be to display a common progress bar for all installs. At this moment, I have a progress bar in the chain installer, but this one reaches 100% before the other packages start to run.
I have read a post, Fun with MsiEmbeddedChainer, that states that what I want can be achieved. But I can't get it to work. I would like a bit more detailed explanations and maybe some code samples.
You can manually control the status of the progress bar by issuing
INSTALLMESSAGE_PROGRESS
messages to the installer. Details can be found here:http://msdn.microsoft.com/en-us/library/aa370354.aspx
In particular, you'll need a custom action to manage the status bar (it is what will be responsible for making the appropriate calls to
MsiProcessMessage
. I recommend that you also use it to spawn the sub-installers. Here is some pseudocode to illustrate what I have in mind:The main down-side is that the progress bar will progress in a somewhat choppy fashion. If you really wanted to get fancy and make it smoother, you could launch a separate "listener" thread that would wait for updates from the sub-installer to make finer-grained increments to the progress bar. Something like:
Obviously each sub-installer would have to be able to signal the main installer that progress has been made, so this will potentially require more extensive changes across your product. Whether or not that is worth the effort is up to you.