I haven’t been keeping up with the Media Center Sandbox forums as well as I would like to lately, and I apologize for that. Based on the forum posts I’ve caught up on over the past weekend 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 found useful 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.
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:
- Building setup packages for Media Center add-ins – http://blogs.msdn.com/astebner/pages/534929.aspx
- Real world example of a Media Center application installer created with WiX – http://blogs.msdn.com/astebner/archive/2006/09/12/751494.aspx
- Converting the Q sample application from WiX v2.0 to WiX v3.0 – http://blogs.msdn.com/astebner/archive/2006/12/10/converting-the-q-sample-application-setup-to-use-wix-v3-0-and-votive.aspx
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:
- WiX users list archive – http://sourceforge.net/mailarchive/forum.php?forum_name=wix-users
- WiX developers list archive – http://sourceforge.net/mailarchive/forum.php?forum_name=wix-devs
- WiX lists subscription page – http://sourceforge.net/mail/?group_id=105970
- WiX bug database – http://sourceforge.net/tracker/?group_id=105970&atid=642714
- WiX feature request database – http://sourceforge.net/tracker/?group_id=105970&atid=642717
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 let me know by posting comments here, posting comments on the Media Center Sandbox forum, and/or emailing me if you have any questions or suggestions for the future.