Handling Installation from within Windows Media Center

Installing software from within Windows Media Center is not practical for the following reasons:

  • The Windows Installer is not designed for distance viewing or use with a remote control.
  • Installation requires administrative permissions.
  • Installation cannot occur on Windows Media Center Extender devices.

To ensure that your installation process runs smoothly on Windows XP Media Center Edition 2005 and later and on the Windows Media Center Extender, specify the path to the Web page with the installation instructions in a call to the MediaCenterEnvironment.CreateDesktopShortcut method (for managed code) or to the MediaCenter.CreateDesktopShortcut method (for hosted HTML). The following example shows the installation process used by the Z sample application. For more information about Z, see Building and Modifying the Sample Applications.

  1. Display a page that uses a timer to determine whether the application is installed by checking the ApplicationContext.IsApplicationRegistered property. If the application is not installed, display an Install Now button that calls the MediaCenterEnvironment.CreateDesktopShortcut method.

    Determining whether the application is installed

  2. The user clicks Install Now, which displays a prompt to open the Web site or save the link.

    The Windows Media Center prompt to open or display the link

  3. The user chooses to open the Web site, which displays a Web page of instructions and a link to the setup program.

    Displaying a Web page with instructions

  4. The user installs the application.

    Installing the application

  5. When the user returns to Windows Media Center, the installation page reflects the change in the ApplicationContext.IsApplicationRegistered property by displaying a Launch Now button. This button calls the MediaCenterEnvironment.LaunchEntryPoint method so that the end user can start the application.

    Displaying a Launch Now button

See Also