SC.exe

SC.exe retrieves and sets control information about services. You can use SC.exe for testing and debugging service programs. Service properties stored in the registry can be set to control how service applications are started at boot time and run as background processes. SC.exe parameters can configure a specific service, retrieve the current status of a service, as well as stop and start a service. You can create batch files that call various SC.exe commands to automate the start up or shut down sequence of services. SC.exe provides capabilities similar to Services in the Administrative Tools item in Control Panel.

It is possible to use Sc.exe and Netsvc.exe to switch the start value of a service, and to remotely start and stop a service.

Using these resource kit utilities provides the ability to accomplish the registry change and ensure that the change is registered with the Services Control Manager. The Services Control Manager database is updated dynamically when using these utilities, allowing you to change the start values and stop and restart services remotely. Otherwise, the remote modification to the registry will require you to restart the remote computer or to make the change in the Services tool in Control Panel at the remote computer.

Administrative rights are required to perform the following commands on the remote computer.

Install Service on remote computer

C:\>sc \\remotecomputer create servicename binpath= C:\service.exe start= auto obj= domain\Administrator password= 1234567!@#$%

Modify the Service configuration on remote computer

C:\>sc \\remotecomputer config servicename binpath= C:\service.exe start= auto obj= domain\Administrator password= 1234567!@#$%

Start the Service on remote computer

C:\>sc \\remotecomputer start servicename obj= domain\Administrator password= 1234567!@#$%

Stop the Service on remote computer

C:\>sc \\remotecomputer stop servicename obj= domain\Administrator password= 1234567!@#$%

Pause the Service on remote computer

C:\>sc \\remotecomputer pause servicename obj= domain\Administrator password= 1234567!@#$%

Retrieve information about the Service from remote computers

C:\>sc \\remotecomputer qc servicename obj= domain\Administrator password= 1234567!@#$%

for more information refer



Please give your feedback for improving this page