markus / FinalService / FinalServiceBase / KCOM_FinalService / ProjectInstaller.cs @ 73e71c89
이력 | 보기 | 이력해설 | 다운로드 (2.26 KB)
1 | 42d49521 | taeseongkim | using System; |
---|---|---|---|
2 | using System.Collections; |
||
3 | using System.Collections.Generic; |
||
4 | using System.ComponentModel; |
||
5 | using System.Configuration.Install; |
||
6 | using System.Linq; |
||
7 | using System.Threading.Tasks; |
||
8 | |||
9 | namespace KCOM_FinalService |
||
10 | { |
||
11 | [RunInstaller(true)] |
||
12 | public partial class ProjectInstaller : System.Configuration.Install.Installer |
||
13 | { |
||
14 | public ProjectInstaller() |
||
15 | { |
||
16 | InitializeComponent(); |
||
17 | |||
18 | this.FinalserviceProcessInstaller = new System.ServiceProcess.ServiceProcessInstaller(); |
||
19 | this.FinalserviceInstaller = new System.ServiceProcess.ServiceInstaller(); |
||
20 | |||
21 | this.FinalserviceProcessInstaller.Account = System.ServiceProcess.ServiceAccount.User; |
||
22 | this.FinalserviceProcessInstaller.Password = null; |
||
23 | this.FinalserviceProcessInstaller.Username = null; |
||
24 | |||
25 | this.FinalserviceInstaller.Description = "Markus Final PDF Generate"; |
||
26 | this.FinalserviceInstaller.ServiceName = nameof(MarkusFinalService); |
||
27 | |||
28 | /// Setup에서 설정된 입력값을 받아서 처리 |
||
29 | this.FinalserviceInstaller.DisplayName = Context?.Parameters["SERVICE_DISPLAY_NAME"]; |
||
30 | |||
31 | var remotingPort = Context?.Parameters["SERVICE_PORT"]; |
||
32 | |||
33 | this.BeforeInstall += ProjectInstaller_BeforeInstall; |
||
34 | this.AfterInstall += ProjectInstaller_AfterInstall; |
||
35 | |||
36 | this.BeforeUninstall += ProjectInstaller_BeforeUninstall; |
||
37 | this.AfterUninstall += ProjectInstaller_AfterUninstall; |
||
38 | |||
39 | this.Installers.AddRange(new System.Configuration.Install.Installer[] { |
||
40 | this.FinalserviceProcessInstaller, |
||
41 | this.FinalserviceInstaller}); |
||
42 | } |
||
43 | |||
44 | private void ProjectInstaller_BeforeUninstall(object sender, InstallEventArgs e) |
||
45 | { |
||
46 | |||
47 | |||
48 | } |
||
49 | |||
50 | private void ProjectInstaller_BeforeInstall(object sender, InstallEventArgs e) |
||
51 | { |
||
52 | } |
||
53 | |||
54 | private void ProjectInstaller_AfterUninstall(object sender, InstallEventArgs e) |
||
55 | { |
||
56 | } |
||
57 | |||
58 | |||
59 | private void ProjectInstaller_AfterInstall(object sender, InstallEventArgs e) |
||
60 | { |
||
61 | } |
||
62 | } |
||
63 | } |