/[projects]/dao/DaoMqPump2/DaoMqPump2/PumpServiceInstaller.cs
ViewVC logotype

Contents of /dao/DaoMqPump2/DaoMqPump2/PumpServiceInstaller.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1986 - (show annotations) (download)
Wed Jul 3 07:56:52 2013 UTC (10 years, 10 months ago) by torben
File size: 1529 byte(s)
Add files
1 using System;
2 using System.ComponentModel;
3
4 using System.Configuration.Install;
5 using System.ServiceProcess;
6
7 //Tilføj System.Configuration.Install assembly reference
8
9 // Denne cklasse bruges
10
11 namespace DaoMqPump2
12 {
13 //[RunInstaller(true)]
14 public class PumpServiceInstaller : System.Configuration.Install.AssemblyInstaller
15 {
16 public PumpServiceInstaller()
17 {
18 ServiceProcessInstaller process = new ServiceProcessInstaller();
19
20 process.Account = ServiceAccount.LocalSystem;
21
22 ServiceInstaller serviceAdmin = new ServiceInstaller();
23
24 serviceAdmin.StartType = ServiceStartMode.Manual;
25 serviceAdmin.ServiceName = "DaoMqPump2";
26 serviceAdmin.DisplayName = "DAO MQ Pump v2";
27
28 // Microsoft didn't add the ability to add a
29 // description for the services we are going to install
30 // To work around this we'll have to add the
31 // information directly to the registry but I'll leave
32 // this exercise for later.
33
34
35 // now just add the installers that we created to our
36 // parents container, the documentation
37 // states that there is not any order that you need to
38 // worry about here but I'll still
39 // go ahead and add them in the order that makes sense.
40 Installers.Add( process );
41 Installers.Add( serviceAdmin );
42 }
43 }
44 }

  ViewVC Help
Powered by ViewVC 1.1.20