非淡泊无以明志,非宁静无以致远 -心静如止水,动于静

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

posted @ 2013-10-26 09:45  烟雨客  阅读(255)  评论(0编辑  收藏  举报