The target system for installation is Windows 7.
First read this articleArticle: Http://blog.csdn.net/defonds/article/details/7906005
Winsw is recommended as the registration service tool, which is indeed good. The project home page is at: https://github.com/kohsuke/winsw
You can simply download an EXE file and rename it install.exe. Then, create an install. xml file and complete the settings on the homepage.
The operation is successful. But not in newlispProgramAlways report the following error
Annot start service from the command line or a debugger...
However, intallutil.exe brought by .netdoes not work. The following error occurs:
Exception occurred while initializing the installation: system. badimageformatexception: cocould not load file or assembly 'file: // C: \ cloud_engine \ nginx \ nginx.exe 'or one of its dependencies. the module was expected to contain an assembly manifest ..
Finally found this: http://ng-srvinst.attron.org/
Download the compressed package, decompress it, and check read. Me. It is very simple.
However, pay attention to the last two configuration items in the ng_srv.xml file:
<Service> <ID> nginx </ID> <Name> nginx </Name> <description> nginx </description> <executable> cloud-engine-home \ nginx \ nginx.exe </executable> <logpath> cloud-engine-home \ nginx \ logs \ </logpath> <logmode> Roll </logmode> <depend> </depend> <startargument>-P cloud-engine-home \ nginx </startargument> <stopargument>-P cloud-engine-home \ nginx-S Stop </stopargument> </service>
-P is followed by the nginxdirectory. If it is written into the nginx.exe path, the nginx service cannot be started.
Now newlisp is successfully called through exec.