Search code examples
wixwindows-installerburnwix3.11

How to do Dynamic Named Instance with Wix+Burn


I have a requirement to create an installer that will allow users to install multiple named instances of our services and application (i.e. Sql Server style).

I have seen that a product called AdvancedInstaller does this and from what I have read this would be achieved through a Bootstrapper capturing the information and streaming it to the MSI. I am assuming here that a Custom UI Burn implementation should be able to do the same, however I cannot find any samples of doing this exactly or on how to do the 'stream' to the MSI.

If I wanted to go this route would I still need to specify instances in my MSI's?

Currently there are separate MSI's for the Windows Services, Application and then a Bundle Bootstrapper EXE that allows the selection of the services to install.

Thanks


Solution

  • MSI has the concept of multiple instance installations using product code changing transforms. These transforms can (but don't have to be) embedded in the MSI. Here's some background reading.

    http://blog.iswix.com/search?q=multiple+instance

    Read the IS12 then the IS2009. Expect many broken links as Microsoft destroyed their sites. Here are 2020 links.

    https://learn.microsoft.com/en-us/windows/win32/msi/installing-multiple-instances-of-products-and-patches

    https://learn.microsoft.com/en-us/windows/win32/msi/authoring-multiple-instances-with-instance-transforms

    https://learn.microsoft.com/en-us/windows/win32/msi/installing-multiple-instances-with-instance-transforms

    When using embedded transforms you are limited to whatever ProductNames you choose when you built them. You could also dynamically generate transforms and apply them.

    WiX's standard bootstrapper application doesn't really have much in the way of supporting all the scenarios I talked about in my blog articles. Other tools such as InstallShield and AdvancedInstaller have more.

    As much as I like WiX, and MSI for that matter, this is really advanced stuff that takes a long time to understand, develop and test solutions for. You might want to look at using a tool such as InstallShield or Advanced Installer or simply creating a normal straight up MSI that installs a template of an application and then create your own custom instance management tool that allows the user to spin up multiple instances of your application.

    I'm an WiX/MSI/InstallShield/DevOps consultant. To be honest, this would not be an inexpensive project if I was to quote it out for a customer.