順序Order

Order 指定要執行同步命令的順序。Order specifies the order in which to execute the synchronous command.

同步命令會啟動在自動的安裝回應檔案中,指定的順序,並在下一個命令會啟動之前,必須完成每個命令。Synchronous commands start in the order specified in the unattended installation answer file, and each command must finish before the next command starts.

若要啟動的命令都必須先完成其他命令之前,可以啟動,請使用同步命令。To start a command that needs to finish before other commands can start, use synchronous commands. 若要執行服務或在相同的時間可以啟動的命令,請使用RunAsynchronous改。To run services or commands that can start at the same time, use RunAsynchronous instead.

RunSynchronous在 auditUser 設定階段,然後在 specialize 設定階段中的系統內容中的使用者內容中執行的命令。RunSynchronous commands run in the user context in the auditUser configuration pass and in the system context in the specialize configuration pass.

Values

OrderOrder

指定要執行同步命令的順序。Specifies the order in which synchronous commands are to be executed. 順序是介於 1 到 500 之間的整數。Order is an integer between 1 and 500.

有效的設定階段Valid Configuration Passes

auditUserauditUser

特製化specialize

父階層Parent Hierarchy

Microsoft-Windows-Deployment | RunSynchronous | RunSynchronousCommand | OrderMicrosoft-Windows-Deployment | RunSynchronous | RunSynchronousCommand | Order

套用至Applies To

如需支援的 Windows 版本與此元件支援的架構,請參閱Microsoft Windows DeploymentFor a list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Deployment.

XML 範例XML Example

下列的 XML 輸出會顯示如何設定同步命令。The following XML output shows how to set synchronous commands.

<RunSynchronous>
   <RunSynchronousCommand wcm:action="add">
      <Credentials>
         <Domain>MyDomain</Domain>
         <Password>MyPassword</Password>
         <Username>MyUsername</Username>
      </Credentials>
      <Description>MySynchCommand1</Description>
      <Order>1</Order>
      <Path>\\network\server\share\filename</Path>
      <WillReboot>OnRequest</WillReboot>
   </RunSynchronousCommand>
   <RunSynchronousCommand wcm:action="add">
      <Credentials>
         <Domain>MyDomain</Domain>
         <Password>MyPassword</Password>
         <Username>MyUsername</Username>
      </Credentials>
      <Description>MySynchCommand2</Description>
      <Order>2</Order>
      <Path>\\network\server\share\filename</Path>
      <WillReboot>OnRequest</WillReboot>
   </RunSynchronousCommand>
</RunSynchronous>

RunSynchronousCommandRunSynchronousCommand