桌面版 Windows 10 的“开始”菜单布局 XML(参考)Start layout XML for desktop editions of Windows 10 (reference)

适用于Applies to

  • Windows 10Windows 10

查找使用者信息?Looking for consumer information? 请参阅自定义“开始”菜单See Customize the Start menu

在 Windows 10 桌面版上,自定义“开始”菜单按下述方式工作:On Windows 10 for desktop editions, the customized Start works by:

  • Windows 10 检查所选择的基本默认布局,如桌面版本以及所在国家或地区是否支持 Cortana 等。Windows 10 checks the chosen base default layout, such as the desktop edition and whether Cortana is supported for the country/region.

  • Windows 10 读取 LayoutModification.xml 文件,并允许将组追加到“开始”菜单。Windows 10 reads the LayoutModification.xml file and allows groups to be appended to Start. 组有以下限制:The groups have the following constraints:

    • 两个组,宽度为 6 列,或等于 3 个中磁贴的宽度。2 groups that are 6 columns wide, or equivalent to the width of 3 medium tiles.
    • 高度为两行中磁贴。2 medium-sized tile rows in height. Windows 10 将忽略在第二行以外范围固定的任何磁贴。Windows 10 ignores any tiles that are pinned beyond the second row.
    • 可以固定的应用数不受限制。No limit to the number of apps that can be pinned. 理论上存在每组 24 个磁贴的限制(每个中等正方形 4 个小磁贴 x 3 列 x 2 行)。There is a theoretical limit of 24 tiles per group (4 small tiles per medium square x 3 columns x 2 rows).

备注

若要使用布局修改 XML 配置"使用漫游用户配置文件启动",请参阅 部署漫游用户配置文件To use the layout modification XML to configure Start with roaming user profiles, see Deploying Roaming User Profiles.

LayoutModification XMLLayoutModification XML

IT 管理员可以使用 LayoutModification.xml 文件预配“开始”菜单布局。IT admins can provision the Start layout using a LayoutModification.xml file. 此文件支持多种修改或替换默认“开始”菜单布局及其磁贴的机制。This file supports several mechanisms to modify or replace the default Start layout and its tiles. 创建 LayoutModification.xml 文件的最简单的方法是使用 Export-StartLayout cmdlet;有关使用说明,请参阅自定义和导出“开始”菜单布局The easiest method for creating a LayoutModification.xml file is by using the Export-StartLayout cmdlet; see Customize and export Start layout for instructions.

所需顺序Required order

的 XML 架构 LayoutModification.xml 需要直接位于 LayoutModificationTemplate 节点下的标记的以下顺序:The XML schema for LayoutModification.xml requires the following order for tags directly under the LayoutModificationTemplate node:

  1. LayoutOptionsLayoutOptions
  2. DefaultLayoutOverrideDefaultLayoutOverride
  3. RequiredStartGroupsCollectionRequiredStartGroupsCollection
  4. AppendDownloadOfficeTile –OR – AppendOfficeSuite (一Office一次只能使用一个) AppendDownloadOfficeTile –OR– AppendOfficeSuite (only one Office option can be used at a time)
  5. AppendOfficeSuiteChoiceAppendOfficeSuiteChoice
  6. TopMFUAppsTopMFUApps
  7. CustomTaskbarLayoutCollectionCustomTaskbarLayoutCollection
  8. InkWorkspaceTopAppsInkWorkspaceTopApps
  9. StartLayoutCollectionStartLayoutCollection

文件不支持注释 LayoutModification.xmlComments are not supported in the LayoutModification.xml file.

支持的元素和属性Supported elements and attributes

备注

要确保“开始”菜单布局 XML 分析程序正确处理你的文件,请在操作 LayoutModification.xml 文件时遵循以下指南:To make sure the Start layout XML parser processes your file correctly, follow these guidelines when working with your LayoutModification.xml file:

  • 元素之间不留空格或空行。Do not leave spaces or white lines in between each element.
  • 不要在 StartLayout 节点或其任意子元素内添加注释。Do not add comments inside the StartLayout node or any of its children elements.
  • 不要添加多行注释。Do not add multiple rows of comments.

下表列出了 LayoutModification.xml 文件支持的元素和属性。The following table lists the supported elements and attributes for the LayoutModification.xml file.

备注

RequiredStartGroupsCollection 和 AppendGroup 语法仅适用于 Import-StartLayout 方法用于生成和部署Windows映像。RequiredStartGroupsCollection and AppendGroup syntax only apply when the Import-StartLayout method is used for building and deploying Windows images.

元素Element 属性Attributes 说明Description
LayoutModificationTemplateLayoutModificationTemplate xmlnsxmlns
xmlns:defaultlayoutxmlns:defaultlayout
xmlns:startxmlns:start
版本Version
用于描述对默认“开始”菜单布局的更改Use to describe the changes to the default Start layout
LayoutOptionsLayoutOptions

父级:Parent:
LayoutModificationTemplateLayoutModificationTemplate
StartTileGroupsColumnCountStartTileGroupsColumnCount
FullScreenStartFullScreenStart
用于指定:Use to specify:
- 是否在桌面上使用全屏“开始”屏幕- Whether to use full screen Start on the desktop
- “开始”菜单中磁贴的列数- The number of tile columns in the Start menu
RequiredStartGroupsCollectionRequiredStartGroupsCollection

父级:Parent:
LayoutModificationTemplateLayoutModificationTemplate
不适用n/a 用于包含 RequiredStartGroups 集合Use to contain collection of RequiredStartGroups
RequiredStartGroupsRequiredStartGroups

父级:Parent:
RequiredStartGroupsCollectionRequiredStartGroupsCollection
RegionRegion 用于包含 AppendGroup 标记,后者表示可追加到默认“开始”菜单布局的组Use to contain the AppendGroup tags, which represent groups that can be appended to the default Start layout
AppendGroupAppendGroup

父级:Parent:
RequiredStartGroupsRequiredStartGroups
NameName 用于指定需要追加到默认“开始”菜单布局的磁贴Use to specify the tiles that need to be appended to the default Start layout
start:Tilestart:Tile

父级:Parent:
AppendGroupAppendGroup
AppUserModelIDAppUserModelID
SizeSize
RowRow
ColumnColumn
用于指定以下任意项:Use to specify any of the following:
- 通用 Windows 应用- A Universal Windows app
- Windows 8 或 Windows 8.1 应用- A Windows 8 or Windows 8.1 app

请注意,AppUserModelID 区分大小写。Note that AppUserModelID is case-sensitive.
start:Folderstart:Folder

父级:Parent:
start:Groupstart:Group
仅 (Windows 10版本 1809 及更高版本中) Name (in Windows 10, version 1809 and later only)
SizeSize
RowRow
ColumnColumn
LocalizedNameResourcetagLocalizedNameResourcetag
用于指定图标文件夹;可以包含Tile、SecondaryTileDesktopApplicationTileUse to specify a folder of icons; can include Tile, SecondaryTile, and DesktopApplicationTile.
start:DesktopApplicationTilestart:DesktopApplicationTile

父级:Parent:
AppendGroupAppendGroup
DesktopApplicationIDDesktopApplicationID
DesktopApplicationLinkPathDesktopApplicationLinkPath
SizeSize
RowRow
ColumnColumn
用于指定以下任意项:Use to specify any of the following:
- 具有已知 AppUserModelID 的 Windows 桌面应用程序- A Windows desktop application with a known AppUserModelID
- 位于已知文件夹中的应用程序,传统的“开始”菜单文件夹中包含此应用程序的链接- An application in a known folder with a link in a legacy Start Menu folder
- 位于传统的“开始”菜单文件夹中的 Windows 桌面应用程序链接- A Windows desktop application link in a legacy Start Menu folder
- Web 链接磁贴,其关联的 .url 文件位于传统的“开始”菜单文件夹中- A Web link tile with an associated .url file that is in a legacy Start Menu folder
start:SecondaryTilestart:SecondaryTile

父级:Parent:
AppendGroupAppendGroup
AppUserModelIDAppUserModelID
TileIDTileID
ArgumentsArguments
DisplayNameDisplayName
Square150x150LogoUriSquare150x150LogoUri
ShowNameOnSquare150x150LogoShowNameOnSquare150x150Logo
ShowNameOnWide310x150LogoShowNameOnWide310x150Logo
Wide310x150LogoUriWide310x150LogoUri
BackgroundColorBackgroundColor
ForegroundTextForegroundText
IsSuggestedAppIsSuggestedApp
SizeSize
RowRow
ColumnColumn
用于通过 Microsoft Edge 辅助磁贴固定 Web 链接。Use to pin a Web link through a Microsoft Edge secondary tile. 请注意,AppUserModelID 区分大小写。Note that AppUserModelID is case-sensitive.
TopMFUAppsTopMFUApps

父级:Parent:
LayoutModificationTemplateLayoutModificationTemplate
不适用n/a 用于向系统区域中经常使用的应用部分添加最多 3 个默认应用。Use to add up to 3 default apps to the frequently used apps section in the system area.

注意:仅适用于版本 1709 以前的 Windows 10 版本。Note: Only applies to versions of Windows 10 earlier than version 1709. 在 Windows 10 版本 1709 中,不能再将应用固定到“开始”菜单中最常使用的应用列表中。In Windows 10, version 1709, you can no longer pin apps to the Most Frequently Used apps list in Start.
磁贴Tile

父级:Parent:
TopMFUAppsTopMFUApps
AppUserModelIDAppUserModelID 配合 TopMFUApps 标记使用,指定具有已知 AppUserModelID 的应用。Use with the TopMFUApps tags to specify an app with a known AppUserModelID.

注意:仅适用于版本 1709 以前的 Windows 10 版本。Note: Only applies to versions of Windows 10 earlier than version 1709. 在 Windows 10 版本 1709 中,不能再将应用固定到“开始”菜单中最常使用的应用列表中。In Windows 10, version 1709, you can no longer pin apps to the Most Frequently Used apps list in Start.
DesktopApplicationTileDesktopApplicationTile

父级:Parent:
TopMFUAppsTopMFUApps
LinkFilePathLinkFilePath 配合 TopMFUApps 标记使用,指定不具有已知 AppUserModelID 的应用。Use with the TopMFUApps tags to specify an app without a known AppUserModelID.

注意:仅适用于版本 1709 以前的 Windows 10 版本。Note: Only applies to versions of Windows 10 earlier than version 1709. 在 Windows 10 版本 1709 中,不能再将应用固定到“开始”菜单中最常使用的应用列表中。In Windows 10, version 1709, you can no longer pin apps to the Most Frequently Used apps list in Start.
AppendOfficeSuiteAppendOfficeSuite

父级:Parent:
LayoutModificationTemplateLayoutModificationTemplate
不适用n/a 用于将已安装的Office套件添加到"开始"。Use to add the in-box installed Office suite to Start. 有关详细信息,请参阅自定义磁贴Office套件For more information, see Customize the Office suite of tiles.

此标记不能与 AppendDownloadOfficeTile 同时使用Do not use this tag with AppendDownloadOfficeTile
AppendDownloadOfficeTileAppendDownloadOfficeTile

父级:Parent:
LayoutModificationTemplateLayoutModificationTemplate
不适用n/a 用于向“开始”菜单中的特定位置添加特定的下载 Office磁贴Use to add a specific Download Office tile to a specific location in Start

此标记不能与 AppendOfficeSuite 同时使用Do not use this tag with AppendOfficeSuite

LayoutOptionsLayoutOptions

运行 Windows 10 桌面版的新设备将默认采用具有 2 列磁贴的“开始”菜单,除非启用了启动到平板电脑模式。New devices running Windows 10 for desktop editions will default to a Start menu with 2 columns of tiles unless boot to tablet mode is enabled. 屏幕尺寸小于 10 英寸的设备默认已启用启动到平板电脑模式。Devices with screens that are under 10" have boot to tablet mode enabled by default. 对于这些设备,用户将在桌面上看到全屏“开始”屏幕。For these devices, users see the full screen Start on the desktop. 你可以调整以下功能:You can adjust the following features:

  • 可以打开或关闭启动到平板电脑模式。Boot to tablet mode can be set on or off.
  • 将在桌面上使用全屏“开始”屏幕设为打开或关闭。Set full screen Start on desktop to on or off. 为此,请在 LayoutModification.xml 文件中添加 LayoutOptions 元素,并将 FullScreenStart 属性设为 true 或 false。To do this, add the LayoutOptions element in your LayoutModification.xml file and set the FullScreenStart attribute to true or false.
  • 将“开始”菜单中的列数指定为 1 或 2。Specify the number of columns in the Start menu to 1 or 2. 为此,请在 LayoutModification.xml 文件中添加 LayoutOptions 元素,并将 StartTileGroupsColumnCount 属性设为 1 或 2。To do this, add the LayoutOptions element in your LayoutModification.xml file and set the StartTileGroupsColumnCount attribute to 1 or 2.

下面的示例演示了如何使用 LayoutOptions 元素在桌面上指定全屏“开始”屏幕并将“开始”菜单设为 1 列:The following example shows how to use the LayoutOptions element to specify full screen Start on the desktop and to use 1 column in the Start menu:

<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    Version="1">
    <LayoutOptions
        StartTileGroupsColumnCount="1"
        FullScreenStart="true"
    />
</LayoutModificationTemplate>

对于升级到 Windows 10 桌面版的设备:For devices being upgraded to Windows 10 for desktop editions:

  • 从 Windows 7 升级的设备默认采用具有 1 列的“开始”菜单。Devices being upgraded from Windows 7 will default to a Start menu with 1 column.
  • 从 Windows 8.1 或 Windows 8.1 Upgrade 升级的设备默认采用具有 2 列的“开始”菜单。Devices being upgraded from Windows 8.1 or Windows 8.1 Upgrade will default to a Start menu with 2 columns.

RequiredStartGroupsRequiredStartGroups

RequiredStartGroups 标记包含 AppendGroup 标记,后者表示你可以追加到默认“开始”菜单布局的组。The RequiredStartGroups tag contains AppendGroup tags that represent groups that you can append to the default Start layout.

重要

对于 Windows 10 桌面版,每个 RequiredStartGroups 标记可以添加最多两个 (2) AppendGroup 标记。For Windows 10 for desktop editions, you can add a maximum of two (2) AppendGroup tags per RequiredStartGroups tag.

你还可以在 RequiredStartGroups 标记中使用可选的 Region 属性或使用 Windows 预配中的多变量功能将区域分配给追加组。You can also assign regions to the append groups in the RequiredStartGroups tag's using the optional Region attribute or you can use the multivariant capabilities in Windows provisioning. 如果使用 Region 属性,你必须使用由两个字母表示的国家或地区代码指定将追加组应用到的国家或地区。If you are using the Region attribute, you must use a two-letter country code to specify the country/region that the append group(s) apply to. 要指定多个国家或地区,请使用管道分隔符 ("|"),如下例所示:To specify more than one country/region, use a pipe ("|") delimiter as shown in the following example:

<RequiredStartGroups
      Region="DE|ES|FR|GB|IT|US">

如果 Windows 设备的国家或地区设置与 RequiredStartGroups 匹配,则向“开始”菜单应用 RequiredStartGroups 中的磁贴布局。If the country/region setting for the Windows device matches a RequiredStartGroups, then the tiles laid out within the RequiredStartGroups is applied to Start.

如果指定与区域无关的 RequiredStartGroups(或不指定可选的“Region”属性),则将该与区域无关的 RequiredStartGroups 应用到“开始”菜单。If you specify a region-agnostic RequiredStartGroups (or one without the optional Region attribute) then the region-agnostic RequiredStartGroups is applied to Start.

AppendGroupAppendGroup

AppendGroup 标记指定将追加到“开始”菜单的一组磁贴。AppendGroup tags specify a group of tiles that will be appended to Start. 每个 RequiredStartGroups 标记允许最多两个 AppendGroup 标记。There is a maximum of two AppendGroup tags allowed per RequiredStartGroups tag.

对于 Windows 10 桌面版,AppendGroup 标记包含 start:Tile、start:DesktopApplicationTile 或 start:SecondaryTile 标记。For Windows 10 for desktop editions, AppendGroup tags contain start:Tile, start:DesktopApplicationTile, or start:SecondaryTile tags.

你可以在 AppendGroup 中指定任意数量的磁贴,但不能指定 Row 属性大于 4 的磁贴。You can specify any number of tiles in an AppendGroup, but you cannot specify a tile with a Row attribute greater than 4. “开始”菜单布局不支持重叠磁贴。The Start layout does not support overlapping tiles.

指定“开始”菜单磁贴Specify Start tiles

要将磁贴固定到“开始”菜单,合作伙伴必须根据要固定的内容使用适当类型的磁贴。To pin tiles to Start, partners must use the right kind of tile depending on what you want to pin.

磁贴大小和坐标Tile size and coordinates

在向“开始”菜单预先固定项目时,不管使用哪种磁贴类型,它们都需要大小 (Size) 和坐标(RowColumn)属性。All tile types require a size (Size) and coordinates (Row and Column) attributes regardless of the tile type that you use when prepinning items to Start.

下表介绍了你在指定磁贴的大小和位置时必须使用的属性。The following table describes the attributes that you must use to specify the size and location for the tile.

属性Attribute 说明Description
SizeSize 确定磁贴的大小。Determines how large the tile will be.

- 1x1 - 小磁贴- 1x1 - small tile
- 2x2 - 中磁贴- 2x2 - medium tile
- 4x2 - 宽磁贴- 4x2 - wide tile
- 4x4 - 大磁贴- 4x4 - large tile
RowRow 指定磁贴显示在哪一行。Specifies the row where the tile will appear.
ColumnColumn 指定磁贴显示在哪一列。Specifies the column where the tile will appear.

例如,Size="2x2"、Row="2" 和 Column="2" 的磁贴位于 (2,2) 处,其中,(0,0) 为组的左上角。For example, a tile with Size="2x2", Row="2", and Column="2" results in a tile located at (2,2) where (0,0) is the top-left corner of a group.

#### start:Tilestart:Tile

你可以使用 start:Tile 标记将下面的任意应用固定到“开始”菜单:You can use the start:Tile tag to pin any of the following apps to Start:

  • 通用 Windows 应用A Universal Windows app
  • Windows 8 应用或 Windows 8.1 应用A Windows 8 app or Windows 8.1 app

要指定上述任意一种应用,你必须将 AppUserModelID 属性设为与相应应用关联的应用程序用户模型 ID。To specify any one of these apps, you must set the AppUserModelID attribute to the application user model ID that's associated with the corresponding app.

重要

AppUserModelID (AUMID) 区分大小写。AppUserModelID (AUMID) is case-sensitive.

下面的示例演示了如何固定 Microsoft Edge 通用 Windows 应用:The following example shows how to pin the Microsoft Edge Universal Windows app:

<start:Tile
         AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
         Size="2x2"
         Row="0"
         Column="0"/>
#### start:DesktopApplicationTilestart:DesktopApplicationTile

你可以使用 start:DesktopApplicationTile 标记将 Windows 桌面应用程序固定到“开始”菜单。You can use the start:DesktopApplicationTile tag to pin a Windows desktop application to Start. 你可以通过以下两种方式指定 Windows 桌面应用程序:There are two ways you can specify a Windows desktop application:

  • 使用 Windows 桌面应用程序快捷方式链接(.lnk 文件)的路径。By using a path to a shortcut link (.lnk file) to a Windows desktop application.

    备注

    在 Windows 10 版本 1703 的“开始”菜单布局中,如果使用组策略或 MDM 来应用“开始”菜单布局并且应用程序是在用户首次登录之后安装,你应可以使用 DesktopApplicationID 而不是 DesktopApplicationLinkPathIn Start layouts for Windows 10, version 1703, you should use DesktopApplicationID rather than DesktopApplicationLinkPath if you are using Group Policy or MDM to apply the start layout and the application was installed after the user's first sign-in.

    要通过此方法固定 Windows 桌面应用程序,你必须在设备首次启动时先在指定位置中添加此 .lnk 文件。To pin a Windows desktop application through this method, you must first add the .lnk file in the specified location when the device first boots.

    下面的示例演示了如何固定“命令行提示符”:The following example shows how to pin the Command Prompt:

    <start:DesktopApplicationTile
            DesktopApplicationLinkPath="%appdata%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk"
            Size="2x2"
            Row="0"
            Column="4"/>
    

    必须将 DesktopApplicationLinkPath 属性设置为指向 Windows 桌面应用程序的 .lnk 文件。You must set the DesktopApplicationLinkPath attribute to the .lnk file that points to the Windows desktop application. 路径还支持环境变量。The path also supports environment variables.

    如果指向第三方 Windows 桌面应用程序且布局是在首次启动之后应用,则必须在首次启动之前将 .lnk 文件置于传统开始菜单目录中;例如,“%APPDATA%\Microsoft\Windows\Start Menu\Programs\”或所有用户配置文件“%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\”。If you are pointing to a third-party Windows desktop application and the layout is being applied before the first boot, you must put the .lnk file in a legacy Start Menu directory before first boot; for example, "%APPDATA%\Microsoft\Windows\Start Menu\Programs" or the all users profile "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs".

  • 使用应用程序的应用程序用户模型 ID(如果已知的话)。By using the application's application user model ID, if this is known. 如果 Windows 桌面应用程序没有此 ID,请使用快捷方式链接选项。If the Windows desktop application doesn't have one, use the shortcut link option.

    你可以在应用程序已固定到“开始”菜单的电脑上使用 Get-StartApps cmdlet 获取应用 ID。You can use the Get-StartApps cmdlet on a PC that has the application pinned to Start to obtain the app ID.

    要通过此方法固定 Windows 桌面应用程序,你必须将 DesktopApplicationID 属性设为与相应的应用关联的应用程序用户模型 ID。To pin a Windows desktop application through this method, you must set the DesktopApplicationID attribute to the application user model ID that's associated with the corresponding app.

    下面的示例演示了如何固定文件资源管理器 Windows 桌面应用程序:The following example shows how to pin the File Explorer Windows desktop application:

      <start:DesktopApplicationTile
            DesktopApplicationID="Microsoft.Windows.Explorer"
            Size="2x2"
            Row="0"
            Column="2"/>
    

你还可以使用 start:DesktopApplicationTile 标记将 Web 链接固定到“开始”菜单:You can also use the start:DesktopApplicationTile tag as one of the methods for pinning a Web link to Start. 另一种方法是使用 Microsoft Edge 辅助磁贴。The other method is to use a Microsoft Edge secondary tile.

要将传统的 .url 快捷方式固定到“开始”菜单,你必须创建 .url 文件(右键单击桌面,选择新建 > 快捷方式,然后键入 Web URL)。To pin a legacy .url shortcut to Start, you must create .url file (right-click on the desktop, select New > Shortcut, and then type a Web URL). 你必须在第一次启动前将此 .url 文件添加到传统的“开始”菜单目录中;例如,%APPDATA%\Microsoft\Windows\Start Menu\Programs\ 或所有用户配置文件 %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\You must add this .url file in a legacy Start Menu directory before first boot; for example, %APPDATA%\Microsoft\Windows\Start Menu\Programs\ or the all users profile %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\.

下面的示例演示了如何创建网站 URL 磁贴(处理方式与 Windows 桌面应用程序磁贴相似):The following example shows how to create a tile of the Web site's URL, which you can treat similarly to a Windows desktop application tile:

<start:DesktopApplicationTile
          DesktopApplicationID="http://www.contoso.com/"
          Size="2x2"
          Row="0"
          Column="2"/>

备注

在 Windows 10 版本 1703 上,Export-StartLayout 将为 .url 快捷方式使用 DesktopApplicationLinkPathIn Windows 10, version 1703, Export-StartLayout will use DesktopApplicationLinkPath for the .url shortcut. 你必须将 DesktopApplicationLinkPath 更改为 DesktopApplicationID 并提供 URL。You must change DesktopApplicationLinkPath to DesktopApplicationID and provide the URL.

#### start:SecondaryTilestart:SecondaryTile

你可以使用 start:SecondaryTile 标记来通过 Microsoft Edge 辅助磁贴固定 Web 链接。You can use the start:SecondaryTile tag to pin a Web link through a Microsoft Edge secondary tile. 相比使用传统的 .url 快捷方式的方法(通过 start:DesktopApplicationTile 标记),此方法不需要任何其他操作。This method doesn't require any additional action compared to the method of using legacy .url shortcuts (through the start:DesktopApplicationTile tag).

下面的示例演示了如何使用 Microsoft Edge 辅助磁贴创建网站 URL 磁贴:The following example shows how to create a tile of the Web site's URL using the Microsoft Edge secondary tile:

<start:SecondaryTile
          AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
          TileID="MyWeblinkTile"
          Arguments="http://msn.com"
          DisplayName="MySite"
          Square150x150LogoUri="ms-appx:///Assets/MicrosoftEdgeSquare150x150.png" 
          Wide310x150LogoUri="ms-appx:///Assets/MicrosoftEdgeWide310x150.png"
          ShowNameOnSquare150x150Logo="true"
          ShowNameOnWide310x150Logo="false"
          BackgroundColor="#FF112233"
          Size="2x2"
          Row="0"
          Column="4"/>

下表介绍了除 SizeRowColumn 以外你可以配合 start:SecondaryTile 标记使用的其他属性。The following table describes the other attributes that you can use with the start:SecondaryTile tag in addition to Size, Row, and Column.

属性Attribute 必需/可选Required/optional 说明Description
AppUserModelIDAppUserModelID 必需Required 必须指向 Microsoft Edge。Must point to Microsoft Edge. 请注意,AppUserModelID 区分大小写。Note that AppUserModelID is case-sensitive.
TileIDTileID 必需Required 必须唯一标识网站磁贴。Must uniquely identify your Web site tile.
ArgumentsArguments 必需Required 必须包含网站 URL。Must contain the URL of your Web site.
DisplayNameDisplayName 必需Required 必须指定你希望用户看到的文本。Must specify the text that you want users to see.
Square150x150LogoUriSquare150x150LogoUri 必需Required 指定在 2x2 磁贴上使用的徽标。Specifies the logo to use on the 2x2 tile.
Wide310x150LogoUriWide310x150LogoUri 可选Optional 指定在 4x2 磁贴上使用的徽标。Specifies the logo to use on the 4x2 tile.
ShowNameOnSquare150x150LogoShowNameOnSquare150x150Logo 可选Optional 指定是否在 2x2 磁贴上显示显示名称。Specifies whether the display name is shown on the 2x2 tile. 此属性的值为 true 或 false。The values you can use for this attribute are true or false.
ShowNameOnWide310x150LogoShowNameOnWide310x150Logo 可选Optional 指定是否在 4x2 磁贴上显示显示名称。Specifies whether the display name is shown on the 4x2 tile. 此属性的值为 true 或 false。The values you can use for this attribute are true or false.
BackgroundColorBackgroundColor 可选Optional 指定磁贴的颜色。Specifies the color of the tile. 你可以指定 ARGB 十六进制值(例如,#FF112233)或指定“transparent”。You can specify the value in ARGB hexadecimal (for example, #FF112233) or specify "transparent".
ForegroundTextForegroundText 可选Optional 指定前景文本的颜色。Specifies the color of the foreground text. 请将此值设为“light”或“dark”。Set the value to either "light" or "dark".

Microsoft Edge 辅助磁贴的大小和位置行为与通用 Windows 应用、Windows 8 应用或 Windows 8.1 应用相同。Secondary Microsoft Edge tiles have the same size and location behavior as a Universal Windows app, Windows 8 app, or Windows 8.1 app.

TopMFUAppsTopMFUApps

备注

仅适用于版本 1709 以前的 Windows 10 版本。Only applies to versions of Windows 10 earlier than version 1709. 在 Windows 10 版本 1709 中,不能再将应用固定到“开始”菜单中最常使用的应用列表中。In Windows 10, version 1709, you can no longer pin apps to the Most Frequently Used apps list in Start.

你可以使用 TopMFUApps 标记向系统区域中经常使用的应用部分添加最多 3 个默认应用,这会将受系统驱动的列表(包括重要或经常访问的系统位置和最近安装的应用)提交至用户。You can use the TopMFUApps tag to add up to 3 default apps to the frequently used apps section in the system area, which delivers system-driven lists to the user including important or frequently accessed system locations and recently installed apps.

你可以使用此标记添加:You can use this tag to add:

  • 具有 AppUserModelID 属性的应用 - 包括具有已知应用程序用户模型 ID 的 Windows 桌面应用程序。Apps with an AppUserModelID attribute - This includes Windows desktop applications that have a known application user model ID. 使用 Tile 标记,同时将 AppUserModelID 属性设为此应用的应用程序用户模型 ID。Use a Tile tag with the AppUserModelID attribute set to the app's application user model ID.
  • 没有 AppUserModelID 属性的应用 - 对于此类应用,你必须创建一个指向已安装应用的 .lnk 文件,并将此 .lnk 文件放入 %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs 目录中。Apps without a AppUserModelID attribute - For these apps, you must create a .lnk file that points to the installed app and place the .lnk file in the %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs directory. 使用 DesktopApplicationTile 标记,同时将 LinkFilePath 属性设为 .lnk 文件名称和路径。Use a DesktopApplicationTile tag with the LinkFilePath attribute set to the .lnk file name and path.

下面的示例演示了如何修改 LayoutModification.xml 文件以在“开始”菜单的系统区域中添加这两类应用:The following example shows how to modify your LayoutModification.xml file to add both kinds of apps to the system area in Start:

<LayoutModificationTemplate
   xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
   xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
   xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
   Version="1">
   <TopMFUApps>
       <Tile AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
       <Tile AppUserModelID="Microsoft.Getstarted_8wekyb3d8bbwe!App" />
       <DesktopApplicationTile LinkFilePath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Win32App.lnk" />
 </TopMFUApps>
</LayoutModificationTemplate>

AppendOfficeSuiteAppendOfficeSuite

你可以使用 AppendOfficeSuite 标记向“开始”菜单中添加内置安装的 Office 应用套件。You can use the AppendOfficeSuite tag to add the in-box installed Office suite of apps to Start.

备注

OEM 必须安装 Office 才可让此标记工作。The OEM must have installed Office for this tag to work.

下面的示例演示了如何向 LayoutModification.xml 文件中添加 AppendOfficeSuite 标记以向“开始”菜单中追加完整的通用 Office 套件:The following example shows how to add the AppendOfficeSuite tag to your LayoutModification.xml file to append the full Universal Office suite to Start:

<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    Version="1">
    <AppendOfficeSuite/>
</LayoutModificationTemplate>

AppendOfficeSuiteChoiceAppendOfficeSuiteChoice

此标记添加到 Windows 10 版本 1803 中。This tag is added in Windows 10, version 1803. 此标记中具有两个选项:You have two options in this tag:

  • <AppendOfficeSuiteChoice Choice="DesktopBridgeSubscription"/>
  • <AppendOfficeSuiteChoice Choice="DesktopBridge"/>

Choice=DesktopBridgeSubscription 运行预安装Windows 10版本 1803 Office 365设备上使用。Use Choice=DesktopBridgeSubscription on devices running Windows 10, version 1803, that have Office 365 preinstalled. 这会将磁贴Office套件的标题设置为Office 365,以突出显示Office 365设备上可用的应用。This will set the heading of the Office suite of tiles to Office 365, to highlight the Office 365 apps that you've made available on the device.

在运行版本 1803 Windows 10版本的设备,以及使用 Office 永久 Choice=DesktopBridge 许可证的设备上使用Use Choice=DesktopBridge on devices running versions of Windows 10 earlier than version 1803, and on devices shipping with perpetual licenses for Office. 这会将磁贴套件Office设置为"创建"。This will set the heading of the Office suite of tiles to Create.

有关详细信息,请参阅自定义磁贴Office套件For more information, see Customize the Office suite of tiles.

AppendDownloadOfficeTileAppendDownloadOfficeTile

你可以使用 AppendDownloadOfficeTile 标记向“开始”菜单中追加 Office 试用版安装程序。You can use the AppendDownloadOfficeTile tag to append the Office trial installer to Start. 此标记将"下载Office磁贴添加到"开始"屏幕,下载磁贴将显示在第二个组的右下角。This tag adds the Download Office tile to Start and the download tile will appear at the bottom right-hand side of the second group.

备注

OEM 必须安装 Office 试用版安装程序才可让此标记工作。The OEM must have installed the Office trial installer for this tag to work.

下面的示例演示了如何向 LayoutModification.xml 文件中添加 AppendDownloadOfficeTile 标记:The following example shows how to add the AppendDownloadOfficeTile tag to your LayoutModification.xml file:

<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    Version="1">
    <AppendDownloadOfficeTile/>
</LayoutModificationTemplate>

示例 LayoutModification.xmlSample LayoutModification.xml

下面的示例 LayoutModification.xml 演示了如何为运行 Windows 10 桌面版的设备配置“开始”菜单布局:The following sample LayoutModification.xml shows how you can configure the Start layout for devices running Windows 10 for desktop editions:

<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    Version="1">
  <RequiredStartGroupsCollection>
    <RequiredStartGroups
      Region="DE|ES|FR|GB|IT|US">
      <AppendGroup
        Name="Fabrikam Group 1">
        <start:Tile
          AppUserModelID="Microsoft.Office.Word_8wekyb3d8bbwe!microsoft.word"
          Size="2x2"
          Row="0"
          Column="0"/>
        <start:DesktopApplicationTile
          DesktopApplicationID="Microsoft.Windows.Explorer"
          Size="2x2"
          Row="0"
          Column="2"/>
        <start:Tile
          AppUserModelID="Microsoft.Office.Excel_8wekyb3d8bbwe!microsoft.excel"
          Size="2x2"
          Row="0"
          Column="4"/>
      </AppendGroup>      
      <AppendGroup
        Name="Fabrikam Group 2">
        <start:Tile
          AppUserModelID="Microsoft.Reader_8wekyb3d8bbwe!Microsoft.Reader"
          Size="2x2"
          Row="0"
          Column="0"/>
        <start:DesktopApplicationTile
          DesktopApplicationID="http://www.bing.com/"
          Size="2x2"
          Row="0"
          Column="2"/>
        <start:DesktopApplicationTile
          DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk"
          Size="2x2"
          Row="0"
          Column="4"/>
      </AppendGroup>
    </RequiredStartGroups>
    <RequiredStartGroups>
      <AppendGroup
        Name="Fabrikam Group 1">
        <start:Tile
          AppUserModelID="Microsoft.Office.Word_8wekyb3d8bbwe!microsoft.word"
          Size="2x2"
          Row="0"
          Column="0"/>
        <start:SecondaryTile
          AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
          TileID="FabrikamWeblinkTile"
          Arguments="http://www.fabrikam.com"
          DisplayName="Fabrikam"
          Square150x150LogoUri="ms-appx:///Assets/MicrosoftEdgeSquare150x150.png"
          ShowNameOnSquare150x150Logo="true"
          BackgroundColor="#FF112233"
          Size="2x2"
          Row="0"
          Column="2"/>
      </AppendGroup>      
    </RequiredStartGroups>
  </RequiredStartGroupsCollection> 
 </LayoutModificationTemplate>

使用 Windows 预配多变量支持Use Windows Provisioning multivariant support

Windows 预配多变量功能允许你声明目标条件,并在条件满足时为每个变量条件提供特定的自定义项。The Windows Provisioning multivariant capability allows you to declare target conditions that, when met, supply specific customizations for each variant condition. 对于“开始”菜单自定义,你可以为每个变量创建特定的布局。For Start customization, you can create specific layouts for each variant that you have. 为此,你必须为你想要支持的每个变量创建一个独立的 LayoutModification.xml 文件,然后在预配包中包含这些文件。To do this, you must create a separate LayoutModification.xml file for each variant that you want to support and then include these in your provisioning package. 有关如何执行此操作的详细信息,请参阅创建包含多变量设置的预配包For more information on how to do this, see Create a provisioning package with multivariant settings.

预配引擎会根据满足的目标条件选择适当的自定义文件,在为测试目的指定的位置中添加此文件,然后使用此特定文件自定义“开始”菜单。The provisioning engine chooses the right customization file based on the target conditions that were met, adds the file in the location that's specified for the setting, and then uses the specific file to customize Start. 为了区分布局,你可以向 LayoutModification.xml 文件名中添加修饰字符串,如“LayoutCustomization1”。To differentiate between layouts, you can add modifiers to the LayoutModification.xml filename such as "LayoutCustomization1". 不管你使用什么修饰字符串,预配引擎都始终输出“LayoutCustomization.xml”,以确保操作系统针对一致的文件名进行查询。Regardless of the modifier that you use, the provsioning engine will always output "LayoutCustomization.xml" so that the operating system has a consistent file name to query against.

例如,如果想要确保特定的条件具有特定的布局,你可以:For example, if you want to ensure that there's a specific layout for a certain condition, you can:

  1. 创建特定布局自定义文件,然后将其命名为 LayoutCustomization1.xml。Create a specific layout customization file and then name it LayoutCustomization1.xml.
  2. 将此文件包含在你的预配包中。Include the file as part of your provisioning package.
  3. 创建你的多变量目标,并在主自定义 XML 文件的目标条件中引用此 XML 文件。Create your multivariant target and reference the XML file within the target condition in the main customization XML file.

下面的示例演示了一个为“开始”菜单提供多变量支持的完整自定义文件的示例:The following example shows what the overall customization file might look like with multivariant support for Start:

<?xml version="1.0" encoding="utf-8"?>
<WindowsCustomizatons>
  <PackageConfig xmlns="urn:schemas-Microsoft-com:Windows-ICD-Package-Config.v1.0">
    <ID>{6aaa4dfa-00d7-4aaa-8adf-73c6a7e2501e}</ID>
    <Name>My Provisioning Package</Name>
    <Version>1.0</Version>
    <OwnerType>OEM</OwnerType>
    <Rank>50</Rank>
  </PackageConfig>
  <Settings xmlns="urn:schemas-microsoft-com:windows-provisioning">
    <Customizations>
      <Targets>
        <Target Id="Processor ABC">
          <TargetState>
          <TargetState> 
            <Condition Name="ProcessorName" Value="Pattern:.*Celeron.*" /> 
            <Condition Name="ProcessorType" Value="Pattern:.*I|intel.*" /> 
          </TargetState>
          </TargetState>
        </Target>
      </Targets>
      <Common>
        <Settings> 
          <Policies> 
            <AllowBrowser>1</AllowBrowser> 
            <AllowCamera>1</AllowCamera> 
            <AllowBluetooth>1</AllowBluetooth> 
          </Policies> 
          <HotSpot> 
            <Enabled>1</Enabled> 
          </HotSpot> 
        </Settings> 
      </Common>
      <Variant>
        <TargetRefs>
          <TargetRef Id="Processor ABC" />
        </TargetRefs>
        <Settings>
          <StartLayout>c:\users\<userprofile>\appdata\local\Microsoft\Windows\Shell\LayoutCustomization1.XML</StartLayout>
          <HotSpot>
            <Enabled>1</Enabled>
          </HotSpot>
        </Settings>
      </Variant>
    </Customizations>
  </Settings>
</WindowsCustomizatons>

当条件满足时,预配引擎调取此 XML 文件并将其放入操作系统设置的位置,然后由“开始”菜单子系统读取文件并应用特定的自定义布局。When the condition is met, the provisioning engine takes the XML file and places it in the location that the operating system has set and then the Start subsystem reads the file and applies the specific customized layout.

你必须为想要支持的所有变量重复这一过程,以便每个变量拥有适用于需要支持的每种条件和目标的不同布局。You must repeat this process for all variants that you want to support so that each variant can have a distinct layout for each of the conditions and targets that need to be supported. 例如,如果你添加了 Language 条件,则可以创建具有独立本地化组的“开始”菜单。For example, if you add a Language condition, you can create a Start layout that has its own localized group.

将 LayoutModification.xml 文件添加到设备Add the LayoutModification.xml file to the device

创建好用于自定义运行 Windows 10 桌面版的设备的 LayoutModification.xml 文件后,你可以使用 Windows ICD 方法来将此 XML 文件添加到设备中。Once you have created your LayoutModification.xml file to customize devices that will run Windows 10 for desktop editions, you can use Windows ICD methods to add the XML file to the device.

  1. 可用自定义项窗格中,展开运行时设置,选择开始,然后单击 StartLayout 设置。In the Available customizations pane, expand Runtime settings, select Start and then click the StartLayout setting.
  2. 在中间窗格中,单击浏览打开文件资源管理器。In the middle pane, click Browse to open File Explorer.
  3. 在“文件资源管理器”窗口中,导航到你保存 LayoutModification.xml 文件的位置。In the File Explorer window, navigate to the location where you saved your LayoutModification.xml file.
  4. 选择此文件,然后单击打开Select the file and then click Open.

这应会设置 StartLayout 的值。This should set the value of StartLayout. 此设置显示在选定的自定义项窗格中。The setting appears in the Selected customizations pane.

备注

目前无法通过 Windows ICD 添加 .url 和 .lnk 文件。There is currently no way to add the .url and .lnk files through Windows ICD.

创建好 LayoutModification.xml 文件并将其添加到设备中后,系统会覆盖基本的默认布局及用于自定义“开始”菜单的任意无人参与设置。Once you have created the LayoutModification.xml file and it is present in the device, the system overrides the base default layout and any Unattend settings used to customize Start.