Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

Program as a Service

Hi,

I have a server 2012 box and im trying to run a Program as a service.

Can somebody give me a hand on this.

Thanks

RM
0
RODRIGOMORCAL
Asked:
RODRIGOMORCAL
2 Solutions
 
oBdACommented:
To run a program as a service that was not developed as a service, you need a wrapper that presents itself as a service and runs the program.
For W2k3, there was SrvAny.exe in the Resource Kit (http://www.microsoft.com/en-us/download/details.aspx?id=17657); it might still work on W2k12 (though only in 32bit), but the better solution is the "Non-Sucking Service Manager" from http://nssm.cc/ (32bit and 64bit version).
Download it and follow the instructions to let your program run as a service.
0
 
becraigCommented:
sc create YourServiceName binPath= "c:\Program Files\directory\appname.exe"


You can then use sc to set startup type etc.

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

also more info at:
http://technet.microsoft.com/en-us/library/bb490995.aspx
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now