Path (microsoft-windows-deployment-runasynchronous-runasynchronouscommand-path)

Path 指定要执行的命令的路径和名称。 RunAsynchronous 命令在 auditUser 配置阶段的用户上下文中运行,并在 specialize 配置阶段的系统上下文中运行。

Path

指定要异步执行的命令的路径和文件名。 该路径可以是本地路径或通用命名约定 (UNC) 路径。 如果路径是 UNC 路径,则必须指定凭据设置。

Path 是一个字符串,其最大长度为 259 个字符。

该字符串类型不支持空元素。 请勿为该设置创建空值。

有效配置阶段

auditUser

specialize

父层次结构

Microsoft-Windows-Deployment | RunAsynchronous | RunAsynchronousCommand | Path

应用于

有关此组件支持的 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows-Deployment

XML 示例

以下 XML 输出显示如何设置异步命令。

第一个命令在本地硬盘驱动器上运行应用程序。 该命令包含环境变量 %ProgramFiles%。 第二个命令从网络运行命令。

<RunAsynchronous>
   <RunAsynchronousCommand wcm:action="add">
      <Description>AsynchCommand1</Description>
      <Order>1</Order>
      <Path>%ProgramFiles%\FabriKam\FabriKam First Run Application.exe</Path>
   </RunAsynchronousCommand>
   <RunAsynchronousCommand wcm:action="add">
      <Credentials>
         <Domain>MyDomain</Domain>
         <Password>MyPassword</Password>
         <Username>MyUsername</Username>
      </Credentials>
      <Description>SynchCommand2-FromNetwork</Description>
      <Order>2</Order>
      <Path>\\network\server\share\filename</Path>
   </RunAsynchronousCommand>
</RunAsynchronous>

RunAsynchronousCommand