markus / MarkusLogview / SignalREngineServiceWindowsService / SignalREngineServiceInstaller.cs @ 29000595
이력 | 보기 | 이력해설 | 다운로드 (1.3 KB)
1 | 84578b97 | djkim | 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 | } |