Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
In the past, I've posted examples (such as this and this) demonstrating how to create installers for Windows Vista Media Center applications using WiX. A couple of those examples ended up shipping in the Media Center SDK for the Q and Z sample applications. Recently, I was asked about how to create a WiX-based MSI that would install and register a Media Center application and also add a custom strip to the Media Center start menu for the application. There is not yet an example for the setup authoring for this specific scenario in the Media Center SDK, so I decided to create something and post it here.
In order to create an MSI that modifies the Media Center start menu, it is necessary to have a general understanding of how start menu customizations can be accomplished. The following information is very helpful to understand this:
How to create an MSI to add a custom strip to the Media Center start menu
I have created a downloadable example that uses WiX v3.0 and creates a custom strip with 5 tiles on it in the Media Center Start menu.
For this example, I used the Register.Application.1 application that is included in the Windows Vista Media Center SDK at C:\Program Files\Microsoft SDKs\Windows Media Center\v5.0\Samples\Register Application.
Here are the exact steps I used to create this example:
How to build and run this example
If you would like to try out this application on your system to see what happens when you install it, you can use the following steps to download the sample and build the MSI:
The above example only demonstrates how to create a custom strip on the Media Center start menu. As you can see by looking at the details of the Register Application sample in the Media Center SDK, there are many other options that can be configured to control where entry points will appear when installing/registering Media Center applications. You will need to adjust the WiX setup authoring shown in this example as appropriate depending on what kind of scenarios you would like to support for your application. Hopefully the example that I posted will provide enough of a starting point to make any further customizations relatively straightforward.
One other very important note - please do not copy and paste the contents of this example and use it as is. Windows Installer uses component GUIDs to uniquely identify resources, so you need to change the component GUID values in the WXS file any time you create a new component in your setup authoring. You can use a tool like guidgen.exe from Visual Studio or http://www.guidgen.com to generate new GUIDs. If you copy and paste the sample, change the names of the files being installed, but do not change the component GUIDs, it will cause install and uninstall problems for products that use the same GUIDs (as described here).
I previously posted an example that allows you to build a WiX-based MSI that will install a Windows Vista
PingBack from http://msdnrss.thecoderblogs.com/2007/08/10/example-wix-based-setup-that-can-be-used-to-build-both-32-bit-and-64-bit-msis/