Share via


RunSynchronousCommand

RunSynchronousCommand specifies a single command to run synchronously on the computer during the specified configuration pass. Synchronous commands are executed in the order specified in the unattended installation answer file. Each command must finish before the next command runs.

RunSynchronous commands are always executed before RunAsynchronous commands in the same pass. RunSynchronous commands run in the user context in the auditUser configuration pass and in the system context in the specialize pass.

Child Elements

Credentials

Specifies the credentials to use when accessing paths.

Description

Specifies a description of the command to execute.

Order

Specifies the order of the command to execute.

Path

Specifies the path to the command to execute.

WillReboot

Specifies in what circumstances to restart the computer after running a synchronous command.

Valid Passes

auditUser

specialize

Parent Hierarchy

Microsoft-Windows-Deployment | RunSynchronous | RunSynchronousCommand

Applies To

For the list of the supported Windows editions and architectures that this component supports, see Microsoft-Windows-Deployment.

XML Example

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>

See Also

Concepts

RunSynchronous