MediaCenterEnvironment.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.
Syntax
public ShortcutStatus CreateDesktopShortcut(string title, uri target);
Parameters
title
System.String. The title of the desktop shortcut.
target
System.Uri. Contains the uniform resource identifier (URI).
Return Value
Microsoft.MediaCenter.ShortcutStatus. A value from the ShortcutStatus enumeration indicating the user's response to the dialog box.
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 device. With an Extender, the dialog box contains the Cancel and Save Link To Desktop buttons. Without the Extender, 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 using the MediaCenterEnvironment.Capabilities property, 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
Reference: Microsoft.MediaCenter
Namespace: Microsoft.MediaCenter
Assembly: Microsoft.MediaCenter.dll
Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later
See Also