How to manually add and remove Windows service

  

When installing MySQL, I found that there is a MySQL service in the windows service. It is obviously not installed and uninstalled completely. What should I do? Xiaobian tells you, I want to delete it. This service! Command: sc delete Service Name.

A service is a program, routine, or process that performs a specified system function to support other programs, especially low-level (near hardware) programs. In fact, a service is a special application that runs from the start of the service, while the normal application is in a sleep state after running until the user operates it again; in WinXP, the service is in the system. It starts automatically after loading, and does not need to log in, but the normal application that runs automatically is executed after WinXP loads and logs in.

There are two cases for the installation service:

Case 1: Installation of a program that can be run as a service becomes a service of WinXP;

Case 2: Installation cannot A program that runs as a service (that is, a normal application) becomes a service of WinXP.

Use the installation tools: srvinstw.exe and srvany.exe, the tools provided in the Win2000 Resource Kit;

The following is the method of manually adding services, when manually not found when adding tools Add a service.

Add a service by modifying the registry:

In the Registry Editor, expand the branch "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services", which is displayed in the right pane Installed service items. To create a new service, just click "edit →new→item", and then name the item, such as "test"; then right-click the item and select "New →String value" or "New & Rarr; Dword value "

Adding a service item specifically needs to add the following key values:

"DisplayName", string value, corresponding service name;

"Description", string Value, corresponding service description;

"ImagePath", string value, corresponding to the path where the server is located;

"ObjectName", string value, value "LocalSystem" , means local login;

"ErrorControl", Dword value, value is "1";

"Start", Dword value, value 2 means automatic run, value is 3 Indicates manual operation, a value of 4 indicates prohibition;

"Type", Dword value, the application corresponds to 10, and the other corresponds to 20.

Also, create a new "Enum" item under the "test". If some must be loaded via srvany, you must also add another Parameters subkey to provide a detailed path to the program to be added as a service. The path above needs to point to the path where srvany is located.

The above mentioned is how to add services, how to delete the windows service, please continue to look at:

Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved