출처 : https://superuser.com/questions/301765/restart-a-windows-service-from-the-command-line



개발을 할 때 가끔 DB 라던지 다른 서비스 프로그램을 재시작 하고 싶을 때가 있다.


그 때를 위해 남겨둔다.



아래 net stop과 net start 사이에 있는 "&" 구문은 명령어를 이어서 실행해주는 부분이라고 하더라.





@echo "MyServiceName" 재시작

@echo off

net stop "MyServiceName" & net start "MyServiceName" 


@pause








Posted by motolies
,