Sample code for launching Windows Media Center and browsing to a specific experience

A couple of weeks ago, I posted a description of an algorithm that can be used to launch Windows Media Center and automatically browse to a specific experience.  At the end of that post, I mentioned that I was working on a Win32 sample application to demonstrate this algorithm.  I've gotten this sample implemented, code reviewed and tested and it is ready to post for download in case you are interested in seeing an example of how the algorithm can be implemented.

You can download the example code and a compiled EXE from http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog%5E_Tools/LaunchMce.zip.

This example contains UI that lets the user select a Windows Media Center page ID from a drop down combo box and select the mode to use when launching Windows Media Center.  It performs a version check to make sure that the system the application is run on includes at least Windows Media Center 2004 (the first version that this method of launching Windows Media Center was supported in).  It also includes a command line mode that allows you to pass in the page ID and launch mode and run the application silently.

Hopefully this helps you get started if you are interested in implementing this algorithm for launching Windows Media Center as a part of your application.

<update date="3/8/2010"> Fixed broken link for the sample code. </update>