Thursday, February 20, 2014

Seven step guide to whipping up your WiX setup

Rob Seder - More on WiX, and Suppressing the License Dialog


As previously discussed, Visual Studio 2012 and later no longer include any sort of MSI/Installer/Setup project template. That means if you create a WinForms, command-line, or Windows Service type of application, there is no way to create an installer for it out-of-the-box.

Instead, you have a couple of free options: Flexera InstallShield Express and WiX. You might find if you work for a company, Flexera has no interest or incentive in helping you find a way to automate their per-developer, but “free” license activation stuff. If you contact them, you might just find that they spend all their time trying to get you to buy the more-expensive products they sell. So, you might be stuck with using Wix.

Wait, so what’s the point again?
So, the point of this blog post is to help out future Robert not to get mad again at WiX. In pretty much all circumstances where I’d want an installer, all I really care about is letting the user pick the installation directory. So, how do you do that? Unfortunately, I don’t have a simple answer, because the solution isn’t simple – but hopefully this blog post will answer those questions, step-by-step, and with the actual details needed!

I’m using VS2013 Ultimate for the example below, but this should work with any SKU of Visual Studio 2012 or later, I believe.

STEP 0: Install WiX:
As of this writing, v3.8 is out and that’s what I’m using, here. Navigate to: and run the installer.

STEP 1: Create a WinForms Project:

STEP 2: Create a WiX Setup Project:

STEP 3: Add Project Reference:

STEP 4: Modify the XML to install the Project Output:

STEP 5: Modify the XML to include a basic setup UI:

STEP 6: Add a reference so that the setup UI works:


STEP 7: And finally, suppressing the License Agreement dialog:

Now, finally, when you compile and run the setup, it should show the wizard from up above, but it skips the license agreement screen.

WiX does have something of a learning curve, and it's tough for those who are used to the Setup and Deployment Package (don't get me started on that being gone) or another UI based MSI creating tool. Rod, besides a little rant, provides a nice guide to get going with it...

No comments: