Creating a Windows Service from the Command Line

Pretty simple, given that you already have your program ready.

Just a word of caution, don’t forget the space between the equals and the quote, see here:

sc create MyServiceName binPath= “c:\program files\myservice\MyServiceName.exe”