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

Annotation of /dao/DaoMqPump2/DaoMqPump2/PumpServiceInstaller.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1988 - (hide annotations) (download)
Wed Jul 3 09:46:23 2013 UTC (10 years, 11 months ago) by torben
File size: 1583 byte(s)
Force visual studio to treat Service* as code only files
1 torben 1986 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 torben 1988 [System.ComponentModel.DesignerCategory("Code")]
14 torben 1986 //[RunInstaller(true)]
15     public class PumpServiceInstaller : System.Configuration.Install.AssemblyInstaller
16     {
17     public PumpServiceInstaller()
18     {
19     ServiceProcessInstaller process = new ServiceProcessInstaller();
20    
21     process.Account = ServiceAccount.LocalSystem;
22    
23     ServiceInstaller serviceAdmin = new ServiceInstaller();
24    
25     serviceAdmin.StartType = ServiceStartMode.Manual;
26     serviceAdmin.ServiceName = "DaoMqPump2";
27     serviceAdmin.DisplayName = "DAO MQ Pump v2";
28    
29     // Microsoft didn't add the ability to add a
30     // description for the services we are going to install
31     // To work around this we'll have to add the
32     // information directly to the registry but I'll leave
33     // this exercise for later.
34    
35    
36     // now just add the installers that we created to our
37     // parents container, the documentation
38     // states that there is not any order that you need to
39     // worry about here but I'll still
40     // go ahead and add them in the order that makes sense.
41     Installers.Add( process );
42     Installers.Add( serviceAdmin );
43     }
44     }
45     }

  ViewVC Help
Powered by ViewVC 1.1.20