Use command line to manage windows service
In OS, we can use sc.exe command to manage mmc windows service. You can start, stop, install, un-install windows service. It is very stateble.
Creating a Service:
sc.exe create PayCalcService binPath= "C:\Program Files\PaymentCalculation\paycalc.exe" DisplayName= "PaymentCalculationService"
Starting a Service:
sc.exe start PaymentCalculationService
Stopping a Service:
sc.exe stop PaymentCalculationService
Deleting a Service:
sc.exe delete PaymentCalculationService
references:
http://mstechnoblogger.blogspot.com.br/2009/04/deleting-services-forcefully-from.html