Create Windows Service from exe file

July 29, 2013 by
Filed under: Uncategorized 

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

Download nssm (non-sucking service manager) from www.nssm.cc

sc create YourServiceName binPath= "c:\nssmdir\nssm.exe"

Note the space after the =

Then go to regedit, go to HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services, and find the new service. Add a new key called “Parameters” and in parameters, add new String Values for AppDirectory, Application, and AppParameters. AppDirectory should be the directory to start from, Application is the executable path and name, and AppParameters is additional flags to send in.

Then you can start it from the Services GUI.

Comments

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!