FirstRunTask (Windows-Shell-starttiles-regionaloverrides-regionaloverride-squaretiles-squareOrDesktopTile11-FirstRunTask) FirstRunTask (Windows-Shell-Setup-starttiles-regionaloverrides-regionaloverride-squaretiles-squareOrDesktopTile11-firstruntask)

FirstRunTask 设置指定默认情况下,当用户第一次登录到 Windows 时,默认情况下为磁贴活动或活动的后台任务。The FirstRunTask setting specifies the background task that is active, or live, by default for a tile when a user signs in to Windows for the first time.

在首次登录时,后台任务必须向 Windows 通知服务注册用户,并且必须将通知发送到应用的动态磁贴。The background task must register the user with Windows Notification Service at first sign-in, and must send notifications to the app’s live tile.

如果当前用户帐户的区域在 "开始" 磁贴区域布局中,则可以使用此设置。If the region of the current user account is among those in the Start Tile regional layouts, you can use this setting. 有关详细信息,请参阅 RegionalOverridesFor more information, see RegionalOverrides.

Values

若要使磁贴成为活动图块,请执行以下操作之一:To make a tile live, do one of the following:

  • 如果后台任务处于 JavaScript 中,请指定实现 IBackgroundTask 接口的 .js 文件。If your background task is in JavaScript, specify the .js file that implements the IBackgroundTask interface.

  • 如果后台任务在 XAML 或 c + + 中,请为应用程序指定类 ID。If your background task is in XAML or C++, specify the class ID for the application.

有效的配置阶段Valid Configuration Passes

specializespecialize

auditUserauditUser

oobeSystemoobeSystem

父层次结构Parent Hierarchy

Microsoft-Shell-安装程序 | StartTiles | RegionalOverrides | RegionalOverride | SquareTiles | SquareOrDesktopTile11 | FirstRunTaskMicrosoft-Windows-Shell-Setup | StartTiles | RegionalOverrides | RegionalOverride | SquareTiles | SquareOrDesktopTile11 | FirstRunTask

适用于Applies To

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows-Shell-SetupFor a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML 示例XML Example

以下 XML 输出显示了如何使用该 <SquareTiles> 组件。The following XML output shows how to use the <SquareTiles> component.

     <SquareTiles>
          <SquareOrDesktopTile1>
               <AppIdOrPath>C:\programdata\microsoft\windows\start menu\programs\desktoptile1.lnk</AppIdOrPath>
               <FirstRunTask>backgroundtask.js</FirstRunTask>
          </SquareOrDesktopTile1>
          <SquareOrDesktopTile2>
               <AppIdOrPath>67890ChannelFabrikam.channel-JKL_mnop1234789!App</AppIdOrPath>
               <FirstRunTask>Fabrikam.FirstRunTask</FirstRunTask>
          </SquareOrDesktopTile2>
          <SquareOrDesktopTile3>
               <AppIdOrPath>C:\programdata\microsoft\windows\start menu\programs\desktoptile3.lnk</AppIdOrPath>
          </SquareOrDesktopTile3>
          <SquareTile1>
               <AppId>12345ChannelFabrikam.channel-ABC_defghij6789!App</AppId>
               <FirstRunTask>backgroundtask.js</FirstRunTask>
          </SquareTile1>
          <SquareTile2>
               <AppId>34567ChannelFabrikam.channel-DEF_012ghijk345!App</AppId>
               <FirstRunTask>Fabrikam.FirstRunTask</FirstRunTask>
          </SquareTile2>
          <SquareTile3>
               <AppId>56789ChannelFabrikam.channel-GHI_67890jklmno!App</AppId>
          </SquareTile3>
     </SquareTiles> 

StartTilesStartTiles

RegionalOverridesRegionalOverrides

SquareTilesSquareTiles

SquareTilesSquareTiles