RunSynchronousCommandRunSynchronousCommand

RunSynchronousCommand 指定要在 windowsPE 設定階段期間執行的單一命令。RunSynchronousCommand specifies a single command to run during the windowsPE configuration pass.

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

所有RunSynchronous系統內容中執行的命令。All RunSynchronous commands run in the system context.

子項目Child Elements

設定Setting 描述Description
認證Credentials 指定用來存取命令,如果命令是在網路共用上的認證。Specifies the credentials used to access the command if the command is on a network share.
描述Description 描述要執行的同步命令。Describes the synchronous command to run.
OrderOrder 指定要執行的命令順序。Specifies the order of the command to run.
PathPath 指定要執行的命令路徑。Specifies the path to the command to run.

有效的設定階段Valid Configuration Passes

windowsPEwindowsPE

父階層Parent Hierarchy

Microsoft-Windows-Setup | RunSynchronous | RunSynchronousCommandMicrosoft-Windows-Setup | RunSynchronous | RunSynchronousCommand

套用至Applies To

如需 Windows 版本與此元件支援的架構清單,請參閱Microsoft Windows 安裝程式For the list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Setup.

XML 範例XML Example

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

<RunSynchronous>
   <!-- First synchronous command to run -->
   <RunSynchronousCommand>
      <Order>1</Order>
      <Path>\\MyNetworkShare\MyApplication.exe</Path>
      <Description>DescriptionOfMyApplication</Description>
      <Credentials>
         <Domain>FabrikamDomain</Domain>
         <UserName>MyUserName</UserName>
         <Password>MyPassword</Password>
      </Credentials>
   </RunSynchronousCommand>
<!-- Second synchronous command to run -->
   <RunSynchronousCommand>
      <Order>2</Order>
      <Path>C:\AnotherApplication.exe</Path>
      <Description>DescriptionOfMyApplication</Description>
   </RunSynchronousCommand>
</RunSynchronous>

RunSynchronousRunSynchronous

RunAsynchronousCommandRunAsynchronousCommand