Share via


MediaCenter.CreateDesktopShortcut Method

Displays a dialog box explaining that the user has invoked an operation that must be performed from the web browser on the Windows Media Center PC, and not from within the Windows Media Center shell. Depending on the user's response, the method can begin the operation immediately by switching control to the user's default web browser, or it can create a shortcut in the Windows Media Center Links folder on the desktop of the Windows Media Center PC, allowing the user to perform the operation at a later time.

Note   This method has been deprecated.

Syntax

  MediaCenter.CreateDesktopShortcut(
  sTitle, sUrl)

Parameters

sTitle

A String that contains the title of the shortcut to add to the Windows Media Center desktop.

sUrl

A String that contains the URL used to invoke the operation from the user's default web browser.

Return Value

A Number (long) that indicates the user's response to the dialog box. It can be any of the following values:

Value Description
0 The user clicked the Open Website in Browser button.
1 The user clicked the Save Link To Desktop button.
2 The user clicked the Cancel button.

Remarks

This method allows your application to guide the user to a traditional "two-foot" web browser to perform an operation such as downloading and installing an executable or ActiveX component or filling out forms that require a lot of typing.

The dialog box contains either two or three buttons, depending on whether the user is using a Windows Media Center Extender. On the Extender, the dialog box contains the Cancel and Save Link To Desktop buttons. On the Windows Media Center PC, the dialog box provides a third button, Open Website in Browser.

Based on the return value, your application should provide the user with appropriate instructions on how to proceed with the operation. Also, by checking the capabilities of the Windows Media Center session (for example, if the Capabilities.IsConsole property is false and the Capabilities.IsVideoAllowed property is true), you can determine whether the user is running in a Windows Media Center Extender session and, if so, instruct the user to return to the computer to complete the task.

Requirements

Platform: HTML application hosted within Windows XP Media Center Edition 2005 through Windows Vista

See Also