I'm sorry I haven't been keeping up with the Media Center Sandbox forums as well as I would like to lately. Based on the forum posts I've caught up on and the comments I've received on my blog, I've noticed that some folks are struggling with creating MSI-based installers for their Media Center applications in order to deliver them to customers. I wanted to summarize some of the information I've used in the past when I was learning how to create installers for Media Center applications myself. I'd also like to hear feedback about how things can be improved in the future.
Samples in the Media Center SDK
If you installed the Windows Vista Media Center SDK to the default path, you will see sample WiX source files for the Q and Z sample applications in the following locations:
- Q - C:\Program Files\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\Setup
- Z - C:\Program Files\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Z\Setup
The files Q.wxs and Z.wxs each have detailed comments that explain what each of the sections of the file is designed to do, along with some gotchas that you need to keep in mind when creating your own WiX-based installers.
In addition, the Q and Z application each include a readme.htm file that includes information about how to build an MSI-based installer for each of these sample applications.
The WiX files in the original release of the Media Center SDK are based on WiX v2.0, and the upcoming SDK refresh will update those files to be based on WiX v3.0.
Unfortunately, all of the above information is only included in the Media Center SDK samples and not in the written documentation. That means it is not searchable via the online Media Center SDK documentation page.
I've written some blog posts that I intended to supplement the information available in the Media Center SDK (since I'm somewhat of a "setup geek" and tend to dig deeper into deployment issues than most Media Center developers would need to). Here are some of the posts I'd consider most interesting for those of you working on building setups for Media Center applications:
Online WiX tutorial
There is a really comprehensive tutorial that I used extensively when I was first learning how to use WiX. You can find it at http://www.tramontana.co.hu/wix/. This tutorial walks you through the end-to-end process of creating a fully featured MSI-based setup. Most of the stuff in this tutorial is overkill for all but the most complex Media Center applications, but it can be helpful in case you want to add items to your setup that are not included in the existing Q and Z sample setup files.
WiX user groups
If all else fails, there is a very active online community of WiX developers and users who field questions, report bugs and help each other resolve WiX issues. The developers at Microsoft who volunteer as WiX developers hang out in these forums and respond to a lot of the questions. Here are some useful links:
I've seen some questions about why the Media Center SDK recommends WiX as a solution for creating MSIs as opposed to other options such as the Visual Studio setup/deployment project system. These recommendations come mostly from me based on my experience and preferences. Most teams at Microsoft that create MSI-based installers now use WiX, and I used it to create the installer for the Media Center SDK itself.
I admit that it has a bit steeper learning curve, and it currently lacks some of the visual designer tools that the Visual Studio setup/deployment projects offer, but the MSIs it produces are cleaner, more fully featured, more reliably patched if necessary, etc. The learning curve is a big thing I hope to help lessen in the future by doing things like the following:
- Enhance the walkthrough documentation that Charlie created for getting started with Media Center application development to discuss deployment in more detail, including using Votive
- Explore options for automating the creation of installers using a model like the one introduced with the ClickThrough tool in WiX v3.0
Hopefully the above is helpful. Please post comments here to let me know if you have any questions or suggestions for the future.