How to create/Where to get Wix Bootstrapper for Multiple Instances - wix

I'm currently learning how to create msi installers using WiX and it seems I've hit a wall.
All is well when I create an MSI containing everything needed for a single environment.
I have features, and components, and can install my MSI.
Now I'm at the stage where I want to convert this in a SQL Server-style installer, where you have multiple instances support.
At the start I want to user to get a screen which allows him to create a new instance, or manage already existing instances. (to update/remove them)
I've spend 2 full days looking everywhere for a solution, without much luck.
I've found the following resources with some info on it, but either they're limited in the number of instances, or don't describe how to such a bootstrapper which gives a user the option described above.
Multiple Instance MSI's and InstallShield 12
Multiple Instance Transforms Walkthrough
Multiple instance installations and patching
Has anyone achieved this already using WiX? Or can anyone point me towards some working examples on how this is achieved?
I know Installshield 2009 can do this, but since this is just a hobby, I don't have the money to buy that. Also I'd like to do it in WiX, since the upcoming Visual Studio 2010 will improve support for it.

Creating multiple instances is pretty easy with WiX v3. You just use the InstanceTransform and Instance elements to create everything. Now, the bootstrapper problem requires something outside of the WiX toolset since we don't have burn, yet. I'm not sure we'll get this functionality in WiX v3.5 (with burn) but it is on our list for burn post v3.5.

Although I've never created a multi-instance setup, I also noticed that Acresso announced MI support in IS 2009. We have IS 2009 but didnt use this feature.
However, Installshield often simply makes use of new MSI features by offering an "intuitive" frontend to them (like for chaining multiple MSIs together into one). So you might want to look for general information on how to achieve that by using the MSI SDK.
Here are some useful links that might point you to the right direction:
Authoring Multiple Instances with Instance Transforms
Multiple Instance Transforms Walkthrough, Proposed Simple Addition to WiX to Make Them Easier

Related

Wix - Select MSI features with Burn bootstrapper [duplicate]

I need to install multiple MSIs from a single unified UI.
I also need a 'feature' tree to let the user select which product(s) to install.
Having looked at similar questions, it seems Burn is the way to go.
Looking at this, it seems I must write a custom BA and implement my own feature tree.
Is this correct?
It seems I'll end-up with a custom UI that won't look like the standard UI for MSIs. This seems a pity when IMHO one the great thing about MSIs is that they always present the same UI to users and have been doing so for years.
If that's the way to go, is there a simple example to get started?
Does wix3.6 really not natively support feature tree? ...seems like a pretty basic and useful feature to have IMHO ...
The feature tree is a custom control on MSI and not available for general use. A standard tree control could be used but no one has added that feature to wixstdba. Of course, you could add the feature (start discussion on wix-devs#lists.sourceforge.net) or implement your own BA. The wixstdba code is in src\ext\BalExtension\wixstdba or for managed example there is src\Setup\WixBA. Both are reasonable places to start.

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

How do you build conditional logic and user options in WiX?

Having been happy with ClickOnce for a long time, I've been thrust into the weird and wacky world of windows installers. It appears to be a world very short on documentation, unless I don't know what I'm searching for.
I'm aware there's lots of options for building an installer, including Visual Studio setup projects and WiX. Given that I'm looking at a fairly complex scenario, I suspect I'll be going with the latter. What I'm struggling with is doing something like this:
Two things to note about this.
First, it already knows what versions of SQL Server I've got installed. Second, the user can select which options to install and which to skip.
I don't know if there's a particular label for these functions that will help me search for them. But I can't find any details on how to start building this sort of logic into an installer, preferably with WiX.
Can anyone get me started?
This installer UI is WixUI_FeatureTree and it selected by UI reference.
Each line in the UI is a feature.
Each feature can be nested under other feature.
The name of the feature is a property that is set by searching the registry.
To choose if the feature should be enable, expanded etc. check the Feature Element.
Hope it will get you started...

WiX extension for burn / bootstrapper

I'm using WixStandardBootstrapperApplication to create a bootstrapper installer using WiX. In it I'm using FileSearch from the WixUtilExtension library (part of a standard WiX install). I'm not quite happy with the logic it's using though, and want to do things just a little differently, but I can't find an easy way to do that. I see my options as:
Create my own managed bootstrapper, this would mean also creating an entire UI experience, which feels like an awful lot of yak shaving.
Create my own library like WixUtilExtension to inject some of my own custom logic.
I favour option 2, given that I have no interest in replacing the overall process offered by WixStandardBootstrapperApplication, but I'm having a hard time finding how to create a burn-centric extension. I can find detail about creating extensions which then get mapped to custom actions (MSI only, not burn bootstrapper), or perform other pre-processing and compiler actions which aren't relevant to my needs here.
How do I go about creating a burn extension? Would I be better off just biting the bullet and creating my own managed bootstrapper, or is there some simple option I'm missing here?
The closest thing to what you want is the BAFunctions.dll that Neil initially wrote for his ExtendedBA. He was able to merge most of that into WiX 3.8. There's example code in Burn's Samples directory.

Wix to Install multiple Applications

I probably have a strange request.
I have develop a msi to install two softwares. After the EULA a screen with two checkboxes must come and on selection of either or both of these checkboxes the corresponding softwares have to be installed.
I have used to install a single software earlier never for two.
I would be obliged for any leads.
Cohesion & Coupling: Bundling applications together in a single MSI file, may seem like a
good idea. It seems intuitively nice and simple. However, speaking
from real world experience I almost always end up splitting
applications to install via their own MSI files, and I don't like
multi-lingual setups either (true multi-lingual setups are difficult because translated content is typically not ready when marketing and sales push to release the native language version quickly - typically the English version).
The only time it is really safe to deploy applications together is when they are guaranteed to:
Always be used together by end users
Always get updated at the same time
Won't grow substantially in size over time (Localization, New Prerequisites, etc...)
And normally it is impossible to predict any of this. Typically you will get new requirements quickly.
Central Challenge: What will likely take on a release-cycle of its own? (split it right now). Things tend to happen suddenly! Here are some common challenges:
Bug fixes: if only one application has a bug, management will want to deliver only one new MSI and leave application 2 untouched and without the need to do a whole new QA-run for both applications after install. This is to reduce risk and to deliver a smaller update that is also quicker to test and verify. Patching is very complicated, and generally safer for MSI files that are as simple as possible without too many languages, custom actions or GUI constructs.
Localization: suddenly you get a requirement to make application 1 available in Italian, application 2 does not need to be translated. Language support tends to greatly increase the complexity of a setup, not to mention the size of it. Your "nice and simple" MSI has now suddenly gotten complicated to maintain, and sluggish to build. It is also a real pain if you need a single setup, and you translate it in many languages - you won't be able to compile the RTM version until all the language updates are in. I can tell you right now that marketing / sales people will have no concept of holding back the English version until all localized versions are ready.
QA / UAT: if the applications are large, delivering 2 separate MSI files will make it easier to split the testing effort between different QA teams and to deliver new updates via nightly builds etc...
Release schedule: suddenly the release schedule for the applications change - application 1 is now updated every month, whilst application 2 is updated only every six months. If different users use the applications, how do you deliver updates? Build it all in one MSI and give it a new version number only to have application 2 users install the same application over again?
Apply the overall developer principles of cohesion and coupling to deployment packages, and you will save yourself a lot of trouble. If the applications now OR in the future may take on their own life cycle - split their deployment right away. And who can see into the future?
Please note that you generally will wrap multiple MSI files in a bootstrapper so that users still have only one file to relate to, even if the products are installed via separate MSI files.
Wix update: With the advent of Wix to create complex setups it has become easier to build Wix include files that can be compiled into several MSI files. This effectively becomes a more flexible type of merge module. This may simplify the splitting or merging of MSI files in the future. See a discussion of this feature here. One more link.
Sheer setup size: There are some limitations with regards to how many components and files you can have in a single MSI. Some details:
What are the limits for a large MSI package?
Limitations of a Large MSI package
Authoring a Large Package
UPDATE: WiX allows preprocessor constructs and Burn bundles that can be used to split large setups.
Long description here: Wix Installer : Setting component condition property when doing a MSIEXEC admin install at command line (markup towards bottom)
And about different "variable types" in WiX: WiX (Windows Installer Xml), Create universal variables (there are many: precompiler, localization, burn, etc...)
It can be helpful to "decompose" a huge MSI into several related MSI for this reason and other reasons listed above - in order to make maintenance easier (build and compile speed, rebuild of just one of many MSI files, etc...). Finally you should stick to using a single file per component to make upgrading and patching work properly. Several MSI files can be installed in sequence using bootstrappers or launcher applications such as Burn from WiX, or features in commercial tools such as Installshield and Advanced Installer. Here is an answer which touches on this topic. And just trowing in another answer which is a little bit similar.
Links:
Installing SQL Server 2014 Express as a prerequisite in boostrapper
Windows installer has a concept of "features" which can be selected for installation or omitted. If you have already created a working installer, then you have at least one <Feature> element in your WIX files.
Simply create multiple <Feature> elements and then use <UIRef Id="WixUI_Mondo" /> or <UIRef Id="WixUI_FeatureTree" /> to allow the user to choose which features he wants to install.
You cannot install multiple applications from a single MSI. Even if you figure out a way to do this you really should not.
Instead have separate MSIs for each app and use a bootstrapper to install both. E.g. you can use Inno Setup to generate a self-contained bootstrapper exe which installs both MSIs (and any pre-requisites as well).
BTW, Wix does not handle creating bootstrappers so you need to use it in conjunction with another tool.
You can do nested msi pre windows installer 4.
But you shouldnt anyway it was deprecated for a reason.
The replacement api is to call msiembeddedui and create a transaction chainer.
You can create multiple MSI's then bundle them into 1 containing MSI. The "parent" MSI allows you to choose which application to install then just runs that MSI.
If you really want 2 applications then there are non-MSI installer builders (like NSIS) that let you do that, but you have to do all the work yourself.