How to open or close the service program? Use DOS command Raiders

  

DOS has gradually gone away, we are used to using Windows 98/Me/2000/XP every day, but do you understand DOS in Windows? Sometimes DOS is much more convenient and faster than Windows. After all, this is a classic of the operating system. The following is a small series to show you how to use the dos command to turn Windows services on or off.

1. Start the service program or shut down the service program using the net start/stop command

net start ServiceName (service Name)

net stop ServiceName

If there is a space in the service name, you need to enclose it in double quotation marks. For example:

C:\\>net start “Windows Firewall/Internet Connection Sharing (ICS)”

The Windows Firewall/Internet Connection Sharing (ICS) service is starting.

The Windows Firewall/Internet Connection Sharing (ICS) service has started successfully.

C:\\>net stop “Windows Firewall/Internet Connection Sharing (ICS)”

The Windows Firewall/Internet Connection Sharing (ICS) service has stopped successfully.

2, use the sc command to start the service program or close the service program

sc start ServiceName (service name)

sc stop ServiceName (service name)

For example:

C:\\>sc start Apache_pn

SERVICE_NAME: Apache_pn

TYPE : 10 WIN32_OWN_PROCESS

STATE : 2 START_PENDING

(NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)

WIN32_EXIT_CODE : 0 (0×0)

SERVICE_EXIT_CODE : 0 (0×0)

CHECKPOINT : 0×0

WAIT_HINT : 0x7d0

PID : 8756

FLAGS :

C:\\>sc stop Apache_pn

SERVICE_NAME: Apache_pn

TYPE : 10 WIN32_OWN_PROCESS

STATE : 3 STOP_PENDING Previous 12 Next Page Total 2 Pages

Copyright © Windows knowledge All Rights Reserved