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 DeploymentFor 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