Share via


Registering AutoPlay Event Handlers for HD DVD and Blu-ray Disc

Windows Media Center supports HD DVD and Blu-ray Disc playback, as follows:

  • When Windows Media Center is running full screen, Windows Media Center can start a third-party playback application when a HD DVD or Blu-ray Disc disc is inserted into the DVD drive. If Windows Media Center is not full screen when a disc is inserted, Windows auto-play manages the playback process.
  • If an HD DVD or Blu-ray Disc disc is already in the DVD drive, Windows Media Center can start a third-party playback application if the user selects Play DVD from the Windows Media Center Start menu.

To register an HD DVD or Blu-ray Disc playback application, use one of the two new categories for application registration:

  • AutoPlay\HD DVD
  • AutoPlay\Blu-ray

Examples

The examples below demonstrate how to register third-party applications with Windows Media Center as follows:

  • The first example registers Notepad.exe to start when an HD DVD disc is inserted while Windows Media Center is full screen.
  • The second example registers Calc.exe to start when a Blu-ray Disc disc is inserted while Windows Media Center is full screen.

You could also register native Windows Media Center applications (MCML and hosted HTML).

For external applications, you should ensure that Windows Media Center is restored to its previous position once the external application is closed. (For an example of how this looks, run any of the games that are included with Windows Media Center in the Extras Library.) Otherwise, if Windows Media Center is not automatically restored, the user will need to use a mouse or keyboard to return to it.

To use these examples, save the XML files, and then register the applications as follows:

  1. Save the following XML to c:\notepad.xml:

    <application title="Notepad" id="{ABCE8379-F381-47b8-AE3D-EF6ADE750500}" companyname="Sample Company" companylogourl="https://www.contoso.com/files/icon2.jpg" description="HD DVD Application">
        <entrypoint id="{ABCE8379-F381-47b8-AE3D-EF6ADE750501}" RUN="c:\windows\notepad.exe" title="Notepad (Sample HD DVD Application)" description="Notepad - a text editor">
            <category category="AutoPlay\HD DVD"/>
        </entrypoint>
    </application>
    
  2. Save the following XML to c:\calc.xml:

    <application title="Notepad" id="{2C5ECB67-E585-4301-BAF4-5380FE6C26AB}" companyname="Sample Company" companylogourl="https://www.contoso.com/files/icon2.jpg" description="Blu-ray Disc Application">
        <entrypoint id="{2C5ECB67-E585-4301-BAF4-5380FE6C26AB}" RUN="c:\windows\System32\Calc.exe" title="Calculator (Sample Blu-ray Disc Application)" description="Calculator application">
            <category category="AutoPlay\Blu-ray"/>
        </entrypoint>
    </application>
    
  3. Run the following commands to register the applications:

    C:\Windows\ehome\RegisterMCEApp.exe /allusers c:\notepad.xml
    C:\Windows\ehome\RegisterMCEApp.exe /allusers c:\calc.xml
    

    To display the applications in the Extras Library, you must register them in other categories with a separate registration. If more than one application is registered in each category, the user is prompted to select the playback application to use.

    If no applications are registered for HD DVD playback, the following dialog box is displayed:

    The HD DVD dialog box

    If no applications are registered for Blu-ray Disc playback, the following dialog box is displayed:

    The Blu-ray Disc dialog box

  4. Run the following commands to remove these example applications from the registry:

    C:\Windows\ehome\RegisterMCEApp.exe /u /allusers c:\notepad.xml
    C:\Windows\ehome\RegisterMCEApp.exe /u /allusers c:\calc.xml
    

See Also