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.
Related
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.
I'm building a bootstrapper installer with custom UI. It has some prerequisites that it needs to check before installing and if anything is missing - show it in UI.
I have 2 possibilites:
Check it in XML of my bootstrapper with utils like RigustrySearch
Check it in UI and set some variables in bootstrapper
Have a custom extension and call it from XML
What is the best approach here?
Pros for having it in XML:
Native way of doing it
Pros for having it in UI part:
I could organize code nice and clean
I can have a separate Dll for prerequisites validation, or even a nuget package
I have way more flexibility and it's more simple to make complex assertions
I can have extra information for each prerequisite, like license info and user friendly name
Pros for having a custom extension:
Don't need to fiddle with variables in XML
I personally am more inclined towards the second option as option one is going to make my XML huge and more difficult to read if I have a lot of prerequisites. Option 3 is nice, but It's more difficult to show the user friendly name for a prerequisite and its license information in UI. What do you guys think?
I think this really depends on what your prerequisites are, and how you intend to handle their presence/absence. Here's my personal preference.
Generally, If I'm going for a managed bootstrapper application I'll have that do the detection of the prereqs if I then need some input from the user, ie. an installation directory, credentials, or whatever. I then pass some values from the managed app, into burn variables, and in turn into Wix properties for the individual msi's to respond to. This is my most used approach.
If all of your prerequisites are part of your bundle anyway, and you don't need any interaction from the user, I tend to go ahead as if I'm installing each package, and the packages themselves are responsible for handling their own upgrade/installation not required behaviours. ie. bundling .Net, or 3rd party installers with your application.
I tend to avoid custom actions for this sort of work, I find them a bit cumbersome when trying to deal with all the successful/failed paths of install/upgrade/repair/uninstall etc.
I think it's a bit subjective to your specific use case, and there's not a single best approach for all situations.
How do I create a localized windows installer package for my WPF application, it has support for 6 languages and I want to have EULA document being localized when user installs the application
I see you tagged Wix and InstallShield, so maybe you are open to try other tools too. Advanced Installer (disclaimer, I work on its development) has in the Professional edition support for multilingual packages.
You just select the languages desired from Translations page, then go to Dialogs page and add a new predefined dialog, select "LicenseAgreementDlg". Advanced Installer will see that you have multiple languages in the package so it will ask you select the EULA file for each language. In roughly 10 minutes you will get your first installer up and running.
I am not quite up to speed on WIX and localization (language support). This online tutorial is a good starting point for you: http://wix.tramontana.co.hu/tutorial/user-interface/do-you-speak-english . Just read through the different User Interface sections.
I don't know which bundling you intend, but in my experience a multi-language setup is less desirable than compiling one MSI file per language. This is easier and faster to compile and work with (very important for large packages), more flexible if you need to bug fix something in a single language, allows you to add new languages easily without full UAT for all languages, and you can deliver the English version as soon as the code is done without waiting several days or weeks for localized files (if any are required).
If you plan to use Windows Installer XML, you can check my answer here. Note that the method is undocumented and not supported by Microsoft, however MS uses it itself and it is working very well.
Just provide a different file for every language transform to the WixVariable WixUILicenseRtf.
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.
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