Export (0) Print
Expand All
0 out of 3 rated this helpful - Rate this topic

Controlling a Service Using SC

The Windows SDK contains a command-line utility, Sc.exe, that can be used to control a service. Its commands correspond to the functions provided by the SCM. The syntax is as follows.

Syntax

sc [ServerName] Command [ServiceName][option1][option2]...

ServerName

Optional server name. Use the form \\ServerName.

Command

One of the following commands:

continue
control
interrogate
pause
start
stop
ServiceName

The name of the service, as specified when it was installed.

option1

An optional parameter.

option2

An optional parameter.

Remarks

To see complete syntax for a command, use the following command:

sc Command

Related topics

Service Control Requests
Service Startup

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.