RunAsynchronousCommand (microsoft-windows-deployment-runasynchronous-runasynchronouscommand)

RunAsynchronousCommand 會指定要在 auditUser Configuration Pass 或特製化設定階段執行的單一命令。

若要執行可以同時啟動的服務或命令,請使用非同步命令。 若要執行必須在其他命令啟動之前完成的命令,請改用 RunSynchronousCommand

RunAsynchronous 命令會在 auditUser Configuration Pass 的使用者內容中執行,以及在特製化設定階段的系統內容中執行。

子元素

設定 描述
認證 指定存取路徑時要使用的認證。
說明 指定要執行的命令描述。
順序 指定每個命令的唯一值。
重要事項:電腦在啟動下一個命令之前,不會等待一個命令完成。
路徑 指定要執行之命令的路徑。

有效的設定階段

auditUser

特殊化

父階層

Microsoft-Windows-Deployment | RunAsynchronous | RunAsynchronousCommand

套用至

如需此元件支援的 Windows 版本和架構清單,請參閱 Microsoft-Windows-Deployment

XML 範例

下列 XML 輸出示範如何設定非同步命令。

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

RunAsynchronous

RunSynchronousCommand