To install an application as a Windows service using Instsrv.exe+srvany.exe [go]

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.