Skip to content

Instantly share code, notes, and snippets.

@cmlewis
Last active August 29, 2015 14:16
Show Gist options
  • Save cmlewis/7e01faee1c3da938b6c5 to your computer and use it in GitHub Desktop.
Save cmlewis/7e01faee1c3da938b6c5 to your computer and use it in GitHub Desktop.
Create Windows Service via Command Line
call sc.exe create MyNewServiceName binPath= "\"C:\path\to\bin\mybin.exe\" --service --config
= \"C:\path\to\config\myconfig.cfg\"" DisplayName= "My New Service" start= "auto"
logpath=C:\logs\mylog.log
dbpath=D:\db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment