RunAsynchronousCommandRunAsynchronousCommand

RunAsynchronousCommand 指定一个命令,来在 auditUser 配置阶段期间运行或 specialize 配置阶段。RunAsynchronousCommand specifies a single command to run during the auditUser Configuration Pass or specialize Configuration Pass.

若要运行服务或命令,可以在同一时间开始,使用异步命令。To run services or commands that can start at the same time, use asynchronous commands. 若要运行命令,需要完成其他命令可以开始之前,请使用RunSynchronousCommand相反。To run commands that need to finish before other commands can start, use RunSynchronousCommand instead.

RunAsynchronous 在 auditUser 配置阶段,在 specialize 配置阶段中在系统上下文中的用户上下文中运行命令。RunAsynchronous commands run in the user context in the auditUser Configuration Pass and in the system context in the specialize Configuration Pass.

子元素Child Elements

设置Setting 描述Description
凭据Credentials 指定访问路径时要使用的凭据。Specifies the credentials to use when accessing paths.
描述Description 指定要执行的命令的说明。Specifies a description of the command to execute.
OrderOrder 指定每个命令的唯一值。Specifies a unique value for each command.
重要:计算机不会等待一个命令开始下一个之前完成。Important: The computer does not wait for one command to finish before it starts the next one.
PathPath 指定要执行的命令的路径。Specifies the path to the command to execute.

有效配置阶段Valid Configuration Passes

auditUserauditUser

专用化specialize

父层次结构Parent Hierarchy

Microsoft-Windows-Deployment | RunAsynchronous | RunAsynchronousCommandMicrosoft-Windows-Deployment | RunAsynchronous | RunAsynchronousCommand

适用于Applies To

有关受支持的 Windows 版本和体系结构支持此组件的列表,请参阅Microsoft Windows 部署For the list of the supported Windows editions and architectures this component supports, see Microsoft-Windows-Deployment.

XML 示例XML Example

以下 XML 输出显示了如何设置异步命令。The following XML output shows how to set asynchronous commands.

<RunAsynchronous>
   <RunAsynchronousCommand wcm:action="add">
      <Credentials>
         <Domain>MyDomain</Domain>
         <Password>MyPassword</Password>
         <Username>MyUsername</Username>
      </Credentials>
      <Description>AsynchCommand1</Description>
      <Order>1</Order>
      <Path>\\network\server\share\filename</Path>
   </RunAsynchronousCommand>
   <RunAsynchronousCommand wcm:action="add">
      <Credentials>
         <Domain>MyDomain</Domain>
         <Password>MyPassword</Password>
         <Username>MyUsername</Username>
      </Credentials>
      <Description>AsynchCommand2</Description>
      <Order>2</Order>
      <Path>\\network\server\share\filename</Path>
   </RunAsynchronousCommand>
</RunAsynchronous>

RunAsynchronousRunAsynchronous

RunSynchronousCommandRunSynchronousCommand