-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectInstaller.cs
More file actions
77 lines (69 loc) · 2.72 KB
/
ProjectInstaller.cs
File metadata and controls
77 lines (69 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Xml;
/// <summary>
/// The ReachOutVeevaPromoMats namespace.
/// </summary>
namespace ReachOutVeevaPromoMats
{
/// <summary>
/// Class ProjectInstaller.
/// Implements the <see cref="Installer" />
/// </summary>
/// <seealso cref="Installer" />
[RunInstaller(true)]
public partial class ProjectInstaller : System.Configuration.Install.Installer
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectInstaller"/> class.
/// </summary>
public ProjectInstaller()
{
InitializeComponent();
}
/// <summary>
/// Handles the AfterInstall event of the serviceInstaller1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="InstallEventArgs"/> instance containing the event data.</param>
private void serviceInstaller1_AfterInstall(object sender, InstallEventArgs e)
{
}
/// <summary>
/// Handles the AfterInstall event of the serviceProcessInstaller1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="InstallEventArgs"/> instance containing the event data.</param>
private void serviceProcessInstaller1_AfterInstall(object sender, InstallEventArgs e)
{
}
/// <summary>
/// Gets the display name of the service and.
/// </summary>
/// <param name="serviceName">Name of the service.</param>
/// <param name="description">The description.</param>
public void GetServiceNameAndDescription(out string serviceName, out string description)
{
string configurationFilePath = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, "exe.config");
XmlDocument doc = new XmlDocument();
doc.Load(configurationFilePath);
XmlNode instanceNode = doc.SelectSingleNode("//appSettings//add[@key='instanceID']");
if (instanceNode != null && (instanceNode.Attributes != null && (instanceNode.Attributes["value"] != null)))
{
serviceName = "ReachOut Veeva ProMats " + instanceNode.Attributes["value"].Value;
}
else
{
serviceName = "ReachOut Veeva ProMats";
}
description = "Imports Veeva ProMats data for " + instanceNode.Attributes["value"].Value;
}
}
}