I’ve been playing a few days with WiX, a very handy toolset to create Microsoft Installer Packages from scratch, very handy and easy to use for complex scenarios (and overkill for simple installers). WiX is an open source project supported by Microsoft and available in its Codeplex site.
You can do a lot of things with Wix, check conditions in the machine, create your own dialogs with a declarative xml, and (as many other Microsoft projects) extend the installer with your own actions or extensions or whatever you want to create.
Googling the internet about some scenarios around Wix, I found a common question:
“how could I extend the Wix dialogs so instead of using a Windows form set of dialogs use WPF screens or pages so my installer will look like the awesome and beauty Microsoft Expression Suite installer”
Yeah, if you install Microsoft Expression Suite you will find a very beautiful installation UI made in WPF:

Yeah, people in the forums and mailing list scratch their head about this scenario, if you think about it’s kind of complex because:
- You need to bootstrap your installation so .Net is installed
- You need to bootstrap your installation so an specific .Net version is installed
- If everything is installed, then, you launch your installation dialogs.
In the installation process if you don’t have any of those dependencies then you need to install them or offer the user the option to download and install, not so simple if you see the installer as a single unit of work.
Well, I didn’t want to keep the secret, so I started a new Expression Suite installation and I found the answer.
To install Expression Suite you launch an exe file, Setup.exe, if you look carefully this is an unmanaged application, let’s say this is kind of bootstrapper for the installation process. It will detect if you have the correct .Net framework installed and if everything looks good would launch Setup\XSetup.exe, a managed WPF application (maybe you can take a look at the assembly Setup\XSetupUI.dll), this is the real installer software. If you peek inside this managed application using a tool like ILSpy or RedGate’s Reflector you will find that it uses .Net interop to call the Windows Installer API and launching the installation of correct packages in the process.
You can take a look at the Setup folder and found the real MSI packages for Expression Suite, they are normal and boring MSI installers:
![CropperCapture[27]](http://cprieto.com/wp-content/uploads/2011/08/CropperCapture27.png)
Mystery resolved, there is no easy way to create an immersive WPF experience for your installers using WiX, at least you sacrifice some time to create your own custom installation boot strappers, something that someday I will put my eye on.
