[C#] 서비스 프로그램 제어
sc create 서비스이름(LSISDSM) binPath="실행파일경로" start=auto displayname="LSIS DSM Service"
sc description 서비스이름(LSISDSM) "this is DSM Service"
https://learn.microsoft.com/ko-kr/windows-server/administration/windows-commands/sc-config
sc.exe 구성
레지스트리 및 서비스 제어 관리자 데이터베이스에서 서비스 항목의 값을 수정하여 서비스 구성을 변경하는 sc.exe 구성 명령에 대한 참조 문서입니다.
learn.microsoft.com
https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicecontroller?view=net-9.0-pp
ServiceController Class (System.ServiceProcess)
Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it.
learn.microsoft.com
[C#] 서비스 제어하기 (시작 / 종료 / 상태 검사)
using System.ServiceProcess; private void Service_Control_Function(){ ServiceController sc = new ServiceController("Service Name"); //ServiceControllerStatus.Running : 서비스 실행 상태 //ServiceControllerStatus.StartPending : 서비스 시작 중 //
nasn.tistory.com