Creates a pinned site shortcut to the current webpage on the Windows Start menu.
This method has no parameters.
This method can return one of these values.
Method not invoked by user action.
An error occurred.
This method is not supported on Windows CE.
The IShellUIHelper4::msAddSiteMode method adds the current webpage to the Windows Start menu under All Programs and launches the webpage as a pinned site. This method must be invoked by a user action, such as clicking a button, and the user is given an opportunity to confirm the action.
The website is not pinned to the taskbar by default. Developers should encourage users to pin the website to the taskbar. Use the IShellUIHelper4::msIsSiteModeFirstRun method to determine when a website is installed, and remind users that the pinned site shortcut can be pinned to the taskbar.
When the webpage is launched as a pinned site, the shortcut icon ("favicon") of the website is used as the pinned site taskbar icon, as well as providing a color hint for the Back and Forward buttons in the pinned site browser window. To learn how to create high-resolution site icons for Windows Internet Explorer 9, see Customizing the site icon.)
Optionally, meta elements can be used to customize the default behavior of the pinned site shortcut. The following elements are "install-time" values that can appear in the webpage when it is pinned. You can use these elements to customize the shortcut created by the IShellUIHelper4::msAddSiteMode method.
|application-name||The name of the shortcut. The value of |
|msapplication-tooltip||Optional text that is displayed as a tooltip when the mouse pointer hovers over the pinned site shortcut icon in the Windows Start menu.|
|msapplication-starturl||The starting page or home URL of the application. If missing, the address of the current page is used instead. Only HTTP or HTTPS protocols are allowed.|
|msapplication-window||The initial size of the pinned site browser window. Content sub-elements provide size as number N, separated by a semicolon. |
The remainder of the elements are "run-time" values that might change over time. These elements can appear in the page that was installed, or in the page specified as the start URL for the pinned site.
|msapplication-navbutton-color||The color of the Back and Forward buttons in the pinned site browser window. Any named color, or hex color value as defined by Cascading Style Sheets, Level 3 (CSS3), is valid; however, custom colors should be dark enough to provide sufficient contrast for the white Back and Forward arrows of the buttons to be visible. For more information, see Color Table. If this meta element is absent, the color is based on the shortcut icon.|
|msapplication-task||You can define up to five tasks. Tasks appear in the Jump List of the pinned site in the Start menu or when it is pinned to taskbar, even when the application is not running. (You can also create Jump List items by calling IShellUIHelper4::msSiteModeAddJumpListItem.) Sub-elements are separated using semicolons. |
The following sub-element is optional:
|msapplication-task-separator||Place this element between tasks to place a visible line in the Jump List menu. The separators must be made unique by declaring |
The following HTML and script restarts the webpage as a pinned site when the user clicks a button.
The following meta elements customize the pinned site shortcut with a tooltip, start URL, initial window size, navigation button color, and a predefined task.
<meta name="application-name" content="Sample Site Mode Application"/> <meta name="msapplication-tooltip" content="Start the page in Site Mode"/> <meta name="msapplication-starturl" content="http://example.com/start.html"/> <meta name="msapplication-window" content="width=800;height=600"/> <meta name="msapplication-navbutton-color" content="red"/> <meta name="msapplication-task" content="name=Task1;action-uri=action1.html;icon-uri=images/icon1.ico"/>