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.
I have written a Windows Media Center application, and now I want to create an MSI-based installer for it. I have looked at the WiX-based setup for the Q sample application in this blog post and in the Windows Media Center SDK for Windows Vista. If possible, I would like to avoid creating a custom action in the MSI to run RegisterMceApp.exe to register the application with Media Center. Is it possible to register my application with Media Center without creating a custom action?
Yes, it is technically possible to register a Windows Media Center application without running RegisterMceApp.exe or the RegisterApplication API. RegisterMceApp.exe performs the following activities to register an application with Media Center:
1. Creates registry values under 3 specific sub-keys:
Note - these values will be created under HKEY_LOCAL_MACHINE if the application is registered for all users by passing the /allusers switch to RegisterMceApp.exe.
2. Calls an API to refresh the Windows Media Center UI if it is running at the time that the application is registered
It is possible to create an MSI that uses entries in the Registry table to create the same values that would be created by RegisterMceApp.exe in item 1 above. You can use the following steps to accomplish this:
Please note that if you create these registry values directly in the Registry table of your MSI to register your Media Center application, you will lose the ability to automatically refresh the Media Center UI if it is running at the time that the MSI is installed. However, you can avoid creating a custom action in your MSI to register your application with Media Center if you are willing to make this trade-off.
For reference, the following topics in the Windows Media Center SDK contain useful information about installing and registering Media Center applications:
I also want to emphasize one other point that is not covered above - in order for your Media Center application to appear correctly on Media Center extenders, you should register it for all users by creating registry values for it under HKEY_LOCAL_MACHINE or by running RegisterMceApp.exe with the /allusers switch.