프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / MarkusLogview / SignalREngineServiceWindowsService / SignalREngineServiceInstaller.cs @ c854511f

이력 | 보기 | 이력해설 | 다운로드 (1.3 KB)

1
using System.ComponentModel;
2
using System.Configuration.Install;
3
using System.ServiceProcess;
4

    
5
namespace SignalREngineServiceWindowsService
6
{
7
    [RunInstaller(true)]
8
    public class SignalREngineServiceInstaller : Installer
9
    {
10
        /// <summary>
11
        /// Public Constructor for WindowsServiceInstaller.
12
        /// - Put all of your Initialization code here.
13
        /// </summary>
14
        public SignalREngineServiceInstaller()
15
        {
16
            var serviceProcessInstaller = new ServiceProcessInstaller();
17
            var serviceInstaller = new ServiceInstaller();
18

    
19
            //# Service Account Information
20
            serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
21
            serviceProcessInstaller.Username = null;
22
            serviceProcessInstaller.Password = null;
23

    
24
            //# Service Information
25
			serviceInstaller.DisplayName = "SignalREngineService Engine Service";
26
            serviceInstaller.StartType = ServiceStartMode.Automatic;
27

    
28
            //# This must be identical to the WindowsService.ServiceBase name
29
            //# set in the constructor of WindowsService.cs
30
            serviceInstaller.ServiceName = "SignalREngineServiceWindowsService";
31

    
32
            this.Installers.Add(serviceProcessInstaller);
33
            this.Installers.Add(serviceInstaller);
34
        }
35
    }
36
}
클립보드 이미지 추가 (최대 크기: 500 MB)