Tuesday, October 30, 2012

Run as Windows Service

Sometimes you want to be able to run a program in the background, and to keep it running even though you are not logged in. Some programs give you the possibility to set them up as services, here are some ways to install any program as a service:

1. Using SC to install it yourself (sc "MyServiceName" binPath= "C:\myservice\my.exe", note the space after binPath)
2. Using instsrv.exe and srvany.exe
3. More types (For 1,2, and 3: http://www.msfn.org/board/topic/83272-how-to-run-a-program-as-a-service/)
4. Adding the script as a Startup Script in Group Policy (http://techsupt.winbatch.com/ts/T000001048F90.html) (gpedit.msc)
5. Using the nice little tool RunAsSvc from Pirmasoft (http://www.pirmasoft.com/runassvc.php)
6. Using YAJSW (Yet Another Java Service Wrapper) (http://yajsw.sourceforge.net/#mozTocId212903)
7. Using JSW (Java Service Wrapper) (http://wrapper.tanukisoftware.com/doc/english/download.jsp)

Source: http://www.msfn.org/board/topic/83272-how-to-run-a-program-as-a-service/

No comments:

Post a Comment