Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Mailbag: How does Media Center decide which extensibility application is launched by SendMessageTimeout?

Mailbag: How does Media Center decide which extensibility application is launched by SendMessageTimeout?

  • Comments 0

Question:

I saw your previous post describing an algorithm for launching Windows Media Center and automatically browsing to an experience.  In that post, you stated that using WPARAM value 13 will browse to an extensibility application.  If I have multiple extensibility applications registered on my system, how can I control which one will be launched when using this algorithm?

Answer:

When Windows Media Center is launched by sending it a message with WPARAM value 13, it will attempt to launch the first extensibility application it finds that is registered in the OEM Extensibility 1 category.  Here is an example XML registration file that can be used with the RegisterApplication API or the RegisterMceApp.exe utility to register an application in this category:

<application title="My Application" id="{PUT_GUID1_HERE}">
  <entrypoint id="{PUT_GUID2_HERE}"
                  addin="Microsoft.MediaCenter.Hosting.WebAddIn,Microsoft.MediaCenter"
                  title="My Entry Point"
                  description="My Entry Point Description"
                  context="http://play.mediacentersandbox.com/mcml/rc1/helix.mcml">
    <category category="More Programs"/>
    <category category="OEM Extensibility 1"/>
  </entrypoint>
</application>

Note that this example XML registration file is for a Windows Media Center Presentation Layer web application, so it will only work on Windows Vista.  However, the only part that is necessary to allow WPARAM 13 to launch this application is the section <category category="OEM Extensibility 1"/>, so you can adapt this example as needed in order to allow it to work on earlier versions of Windows Media Center.

Also, it is not necessary to register the application in the "More Programs" category for WPARAM 13 to successfully launch it, but I included that here because without registering it in a category such as "More Programs" the application will not have a visible entry point in the Windows Media Center UI and the user will not be able to launch it by clicking on a tile in the UI.

 

Leave a Comment
  • Please add 1 and 4 and type the answer here:
  • Post