Apply Program To add a service, you need two small software: instsrv.exeand srvany.exe. Instsrv.exeallows you to install and delete services for the system. srvany.exe allows programs to run as services. These two software are included in Windows NT Resource Kit.
Save the two programs in a convenient location, such as the C root directory. For example, we add OE as a service to the Windows XP Professional operating system and name it "mail ". Enter "cmd" during running, press enter, open the command line window, enter "C: \ instsrv.exe mail c: \ srvany.exe" at the end of the prompt, and press enter, where "C: \ instsrv.exe "and" C: \ srvany.exe "indicate the locations where the two programs are stored, while mail indicates the service name you want to add.
Run regedit to open the Registry Editor. under HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services, find the added mail, right-click it, create a new key, name it "Parameters", and click the new parameters, create a new sub-key named "application". The data type is "REG_SZ", and the value is the location of the program to be run as the service, if your windows system is installed on drive C, the OE program is located in C: \ Program Files \ Outlook Express \ msimn.exe. Add this path to the value. Now, this service has been successfully added and configured. If you want to be more professional, you can create a sub-key named description under the mail service, the data type is also REG_SZ, the value can write some of your descriptions of this service, we can see this later.
Next, you need to make some additional settings for the service and enter "services. MSC "and press Enter. In the list, find the newly added mail service and double-click it to perform detailed settings. On the "General" tab, we need to set the running mode of this service. As shown in figure 2, as a service, there are "automatic" and "Manual) "and" disabled "Start types, as required, we generally set to automatic. On the "Logon" tab, you can set the identity of the Service to run. Generally, you can ignore it and follow the default settings. Under the "recovery" tab, the recovery settings are implemented. You can specify the measures to be taken after the first, second, and third errors of the service. "Dependencies" shows the dependencies between services, allowing you to check which other services the service depends on and what services the service depends on. The following are meaningless to our general users. After these settings, your service is completely working properly.
Log out and check. To let you see the cleanup, we first open Oe. In the task manager, there are two msimn processes. The user name ".com.cn" is the OE we opened, the User Name "system" is the service we added.
If you do not want to run the service again, you can directly disable the instance running at startup, and delete it using the instsrv.exe program. Enter "C: \ instsrv.exe mail remove" in the command line, and press Enter. The specified instsrv.exe program can also delete some system services, so be careful when using it. For system services, Security Do not delete it, even if you think it is useless to you.
Http://blog.csdn.net/zhuzhaohui640/archive/2007/11/27/1904382.aspx