Transferred from: http://qingmu.blog.51cto.com/4571483/1248649
First, what is Instsrv.exe and Srvany.exe
Instsrv.exe.exe and Srvany.exe are two utilities in the Microsoft Windows Resource Kits toolset that work together to run any EXE application as a window service. Srany.exe is the service shell that registers the program, which allows the application to be launched as a system account, enabling the application to start automatically as a service randomization for Windows, thereby hiding unnecessary windows such as the application console. Then we certainly want to install Srvany.exe can complete the above functions? The answer is right, But install Srvany.exe need to use another tool Instsrv.exe, yes, Instsrv.exe role is to install Srvany.exe tools, so I believe you understand the role of Instsrv.exe and Srvany.exe, the following is a simple introduction to how EXE should be Use the program to make Windows services.
Second, the Operation procedure
1. Get the application
Slightly
2, install Srvany.exe with Instsrv.exe
Copy the Instsrv.exe and Srvany.exe to the "C:\WINDOWS\system32" directory (if it is a 64bit system, copy it to C:\WINDOWS\SysWOW64), Install Srvany.exe with Instsrv.exe and enter the DOS interface:
1 |
C:\Documents and Settings\administrator>C:\WINDOWS\SysWOW64\instsrv.exe MyService C:\WINDOWS\SysWOW64\srvany.exe |
Note: MyService is the name of the custom service and can be changed arbitrarily depending on the application name.
3. Configure the Srvany.exe
Click "Start-run-regedit" To open the registration list and navigate to the following path:
Hkey_local_machine\system\currentcontrolset\services\myservice
MyService is the name that you defined when you installed Srvany.exe.
In general, the service name does not have a parameters project and needs to be established manually: Right-click the new item on the service names item, called
Parameters, then navigate to the Parameters key and create the following string values.
The name application value is the address of the program that you want to run as a service.
The name Appdirectory value is the folder path of the program that you want to run as a service.
The name appparameters value is the parameter you need to start the program that you want to run as a service.
The following is a simple applet configuration example Description:
After the configuration is complete, the authentication service is as follows:
At this point, using Instsrv.exe+srvany.exe to install the application as a Windows service is complete, if you have other good suggestions and methods, please give more guidance, thank you!
This article is from the "is Wood Forest" blog, please be sure to keep this source http://qingmu.blog.51cto.com/4571483/1248649