top | item 39949010

Twenty years maintaining the WiX Toolset

67 points| soheilpro | 2 years ago |robmensching.com | reply

63 comments

order
[+] nray|2 years ago|reply
When Microsoft launched the (let's face it, baroque) complexity that is Windows Installer (MSI), we didn't get the WiX Toolset, instead we got an expensive proprietary profiling tool for capturing before/after snapshots, and an entry-level version bundled on the Windows 2000 CD which didn't really solve anybody's problem. No suprises then that the MSI format didn't immediately take over, and Microsoft would presume all the way to Intune that their customers were deploying MSI packages when mostly we weren't.

I always wondered what would have happened if the WiX Toolset had been available from the start, and I like to compare the more organic success of the Microsoft Deployment Toolkit (MDT) being more open and hackable as an example. I guess the time just wasn't right.

[+] api|1 year ago|reply
This is a bit tangential, but I consider all this complexity to be a code smell. The real answer to the problem MSI, WiX, and on Linux package managers and nix are trying to solve is the wrong problem.

The entire concept of installing application software “on” the system in a way that modifies the OS is deeply flawed. It’s a security nightmare and it doesn’t scale. As you try to scale it you inevitably have to build a massive baroque state management system that is brittle and terrible for developers to use.

Mobile has the right idea here. Apps are containers. If it seems like an app needs to reach outside of its container this in fact is revealing a shortcoming of the OS APIs that should be addressed there.

Installing an app should be a matter of dropping it on the system. Uninstalling it should be a matter of deleting it.

There might still be a niche for installers in this world but they would be for drivers and OS level third party enhancements. There would not be many of these. 99% of apps do not need this level of access.

Going back to the first paragraph: if you find yourself trudging through a tangled swamp of complexity with no end in sight, I personally believe that this a sign that you are either solving the wrong problem or solving it in a fundamentally wrong way.

When confronted with this a good developer will solve it. A great developer will question it. A genius will make it unnecessary.

The question to always be asking is: is this incidental complexity or essential complexity? Essential complexity is present in the real world problems being solved. Incidental complexity is self inflicted. I personally believe that most software complexity is incidental. It’s at least more than half.

[+] cfn|2 years ago|reply
I really tried to use msi back when it appeared but it wouldn't work in certain versions of Windows without installing something else before. I can't remember the details but it was self defeating.
[+] burnte|1 year ago|reply
I'm not sure what your experience is, but in the vast majority of enterprise AD forests, most apps are deployed by MSI and have been for quite a while. MSI actually took off really quickly, and most installer kits shrank a lot, many disappearing. These days most of the remaining large commercial installer kits generate MSIs as well as EXEs.
[+] GnarfGnarf|1 year ago|reply
To those who complain about the poor documentation: that's the whole point. The maintainer offers consulting services ($5,000/yr.). It is in his interest that users should need his help.

It's worth it for commercial customers. It's a fair business model for an Open Source project.

[+] Kwpolska|1 year ago|reply
To have customers for their consulting business, they first need to convince people WiX is the way to go, and if there are no docs and developers struggle with building the most basic installer, they would probably try looking elsewhere before burning $5000. Speaking of $5000, that’s $500 more than a 3-year InstallShield subscription.
[+] hypercube33|1 year ago|reply
Really the dig should be on Microsoft -- I had to hand write an xml for WiX to push out a small single exe project and if I had hair left I'd have ripped it clear out -- how is making an MSI file harder than say NSIS or innosetup? I get their toolage is for visual studio projects but I wrote this outside of that so I'm on my own.
[+] ptx|1 year ago|reply
If you only need the basics, you can also use GNOME's msitools[0], which use the same XML format as WiX but don't require Windows to build the MSI package.

[0] https://wiki.gnome.org/msitools

[+] sebazzz|1 year ago|reply
Isn’t WiX 4 now cross-platform, the SDK at least?
[+] micovec|2 years ago|reply
I have to agree with others here. It's better to use Wix as a thin layer on top of Windows Installer but the documentation is very, very poor.

I spent a week of trial and error to create an installer just to find out that I had several installations of my app because of some misconfigured xml document from testing. A nightmare to uninstall to say the least.

I highly recommend to test your installers inside a VM or you'll screw up your system.

Also good luck if you want custom behaviour from the installer. The documentation for that is far worse than it is for the standard msi installer.

[+] Kwpolska|2 years ago|reply
Twenty years maintaining, but the quality of the documentation doesn’t show that. Making an installer in WiX 4 with only one or two fancy things required 3-4 days’ worth of trial-and-error, and searching the WiX sources to figure things out. The docs barely tell you anything.
[+] sanqui|2 years ago|reply
I wasn't able to figure it out. The docs [1] have absolutely no information or overview on how the tool works, or how you should get started with creating a simple installer. Besides setup instructions, it only has details on individual sub components, beginning with with "Burn bundles". All linked tutorials are for previous versions of WiX. Is the expected workflow that I read a v3 tutorial and then read the "v4 for v3 users" article (which immediately leaves me discouraged with "A lot about WiX has changed between v3 and v4"), or that I immediately purchase enterprise support?

[1]: https://wixtoolset.org/docs/

[+] viraptor|2 years ago|reply
Same, but I just gave up after 2 days. I really wish there was a one-click option in VS.net to create an installer that checks/pulls the required version of runtime, installs the target exe, all its DLL dependencies, and all custom files marked for release.

It's what 99.9% of apps need, so why is there no "do the defaults" path? You even need to pass things through the Heat generator to get multiple resulting files listed automatically. This is not an exclusive Wix issue though - no project offers that as far as I can tell and it really sucks.

[+] mopsi|1 year ago|reply
Agreed. Even basic things like detecting if the installer is making a fresh install or upgrading existing installation require arcane condition checks: https://stackoverflow.com/questions/320921/how-to-add-a-wix-... And worst of all, all sources I've ever found (including the linked answers) contain at least a few mistakes or unhandled cases, so I'm not confident enough to make any improvements. Documentation could really use battle-tested examples from people who understand MSI installers very well.
[+] nray|1 year ago|reply
I'm wondering how much of the frustration in the comments here is due as much to the arcane design of the Windows Installer format as to shortfalls in WiX and its documentation. I would say that you need a good understanding of MSI databases before trying to use WiX, which implies thinking about the installer while developing the app, which was the goal of the toolkit.

Packaging can be hard on any platform but Microsoft really outdid itsself with MSI. If you already have a finished product and just need to package it then NSIS or Inno were much simpler to pick up.

Many products are released as MSI files because that's what enterprise deployment tooling supported, but inside is a setup executable, which defeats the entire transactional rollback design of the thing.

[+] RedShift1|2 years ago|reply
I switched from wix to NSIS. It's not perfect but it's certainly a lot easier, and whatever problem you may have, the solution is usually only a Google search away.
[+] croes|2 years ago|reply
Maybe we should try LLMs to generate documentation.
[+] issafram|2 years ago|reply
I remember having to use it at an employer many many years ago. The documentation was horrible and nothing was intuitive about the XML.
[+] bobince|2 years ago|reply
Yeah it's a thin layer over MSI tables, so if you don't already know how Windows Installer works then it's not at all clear how to do many seemingly-basic installer tasks. And few people really know how Windows Installer works because that is itself obscure, poorly designed and documented.

But a thin layer over MSI is actually what you want; the commercial tools that preceded WiX and tried to abstract away what Windows Installer was actually doing were much worse. Because Windows Installer is such a mess of counterintuitive design and bugs that you are going to need to debug it.

WiX is to be saluted for greatly reducing the level of misery involved in making installers for Windows. But the level of misery is still very high indeed.

[+] tichiian|2 years ago|reply
Needs a name change. Absolute no-go in Germany, because the name means "wank".
[+] laeri|1 year ago|reply
It doesn't need a name change. You would write wank in a completely different way only the spelling sounds the same.
[+] StrauXX|1 year ago|reply
No matter which term you use, its gonna mean something "bad" in some language. And besides, another company, also called wix (a graphical website builder), used that exact fact in Germany/Austria/Switzerland to make a big marketing campaign.
[+] croes|2 years ago|reply
But a different spelling