How to change the Startup Type for a Windows service via Command Prompt

How to change the Startup Type for a Windows service via Command Prompt

Procedure Steps

Complete the following steps to change the startup type for a Windows service using Command Prompt. This can be useful if you need to configure the services in batch files and in situations where the Windows Services window is not available.

1) Open Command Prompt.
- Click on the Start button, and then select Run.
Type cmd in the Open field, and then click [OK].

2) Type one of the following commands, depending on the startup type you want to change:

To configure a service to start automatically at system startup (startup type is "Automatic"), enter the following command:
sc \\SERVERNAME config "Service Name" start= auto

To configure a service to be able to be started and stopped manually (startup type is "Manual"), enter the following command:
sc \\SERVERNAME config "Service Name" start= demand

To configure a service to be disabled (startup type is "Disabled"), enter the following command:
sc \\SERVERNAME config "Service Name" start= disabled

Substitute the full name of the service (as listed in the Windows Services window) for "Service Name." Quotation marks are required.

Substitute the correct hostname of the computer for SERVERNAME. The backslashes are required. If the command is being run to change the startup type of a service on the local computer, \\SERVERNAME is not required.

Important: The space after the equal sign (=) is REQUIRED in each command. The command will not execute unless this space exists.

When each command is executed, the following response should be displayed in Command Prompt:
[SC] ChangeServiceConfig SUCCESS

At this point, the start type of the service is changed.

Applies To

Windows (All versions)

Additional Information

To configure a Windows service in an NEC ExpressCluster X system, substitute \\FAILOVER for \\SERVERNAME.

For more information on configuring Windows services using the sc command, refer to the Microsoft Knowledge Base

http://.microsoft.com