Start Service

Microsoft.MSMQ.2008.Task.StartService (Task)

Starts the MSMQ Service at the server.

Element properties:

TargetMicrosoft.MSMQ.2008.Servers
AccessibilityPublic
CategoryCustom
EnabledTrue
RemotableFalse
Timeout300

Member Modules:

ID Module Type TypeId RunAs 
PA WriteAction System.CommandExecuter Default

Source Code:

<Task ID="Microsoft.MSMQ.2008.Task.StartService" Accessibility="Public" Enabled="true" Target="Microsoft.MSMQ.2008.Servers" Timeout="300" Remotable="true">
<Category>Custom</Category>
<WriteAction ID="PA" TypeID="System!System.CommandExecuter">
<ApplicationName>%windir%\system32\net.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>start $Target/Property[Type="Microsoft.MSMQ.2008.ServerRole"]/ServiceName$ /y</CommandLine>
<TimeoutSeconds>300</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
<Files/>
</WriteAction>
</Task>