FirstRunTask (starttiles-squaretiles-squareordesktoptile7-FirstRunTask) FirstRunTask (microsoft-windows-shell-setup-starttiles-squaretiles-squareordesktoptile7-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.
值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 | SquareTiles | SquareOrDesktopTile7 | FirstRunTaskMicrosoft-Windows-Shell-Setup | StartTiles | SquareTiles | SquareOrDesktopTile7 | FirstRunTask
适用于Applies To
有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows-Shell-Setup。For 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>