install service command line windows server 2012 code example Example: install windows service SC CREATE "MySVC" binpath= "D:\Me\Services\MySVC\MySVC.exe"