Tuesday, October 11, 2005

Add a Cygwin command as a Windows service

If you want a Cygwin app (Apache or Webmin for example) to start when windows does, there is a useful tool that you should know about. "cygrunsrv" comes as standard with Cygwin and can be used to create Windows services.

For example, to have Apache run when Windows boots:

cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe [-a arguments] \ [-e VAR=VALUE] [-t auto manual] [-u user] [-w passwd]

No comments: