Win7 uses the command line to start and stop the Windows service program

  
                

The Windows service program is an executable application that can perform certain functions under the Windows operating system. If it runs, it will also occupy system resources. If we can stop the system service in a timely manner, the computer will run faster. The following small series will share with you the method of using the command line to start and stop the Windows service program under Win7 system, so that everyone can operate freely!

There are many ways to start a stop service:

Some programs provide a setup interface, which can be set to start and stop. You can also use some third-party programs to control Start and stop, such as a certain guardian and the like; can also specify the service program start and stop through the service management of the windows system; but these methods are too troublesome to operate, if you need to frequently switch to start and stop, the above operation mode It seems a bit confusing, and it is very convenient to start and stop through the command line. Using the command line is also very simple, let's get into the actual operation.

The method/step is as follows:

1. Right click on the desktop <; Computer> Select “Manage” menu item.

2, click on the & ldquo; management & rdquo; the menu, will open the Computer Management window, the tree list on the left, click on the & ldquo; Services & rdquo; entry node. The right side of the window is a list of system service items, with service name, service description, status, etc., where you can terminate the service and adjust the service startup mode. Below, we take the "MSSQLSERVER" service in the red circle in the figure as an example.

3, select the service in the list of services, right-click in the pop-up menu, select & ldquo; Properties & rdquo; menu, open the Properties window.

4, open the Properties window of purpose, mainly to get the service name, because the list to see name is called & ldquo; & rdquo ;, displays the name of the command-line operation time must be specified service name Only then. In the red circle of the figure, this name can be selected with the mouse, press the shortcut key Ctrl+C to copy to the system clipboard for later use.

5, you can use any text editor to edit the system that comes with a notepad, open Notepad and paste the service name to just copy the text.

6, the rest of the supplements on command. Start the service with the command: NET STAR, stop the command with the command: NET STOP, supplemented in front of the service name. Start and stop respectively create a text to control start and stop.

7, save the document as a .bat format. Click the File menu in the Notepad menu and select Save. In the pop-up Save dialog box, note: Set the save type to All Files so that you can name the file suffix yourself. Of course, you can also save the file extension to the resource manager and change it to .bat. In this way, the service command line files for starting and stopping are all ready, and the service can be started and stopped conveniently.

These are the Win7 system using the command line to start and stop the Windows service program, after we learned, will feel the method is very simple, see the tutorial please be patient Oh!

Copyright © Windows knowledge All Rights Reserved