-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInstaller.cs
executable file
·34 lines (32 loc) · 1.21 KB
/
Installer.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
namespace NetworkSharing
{
[RunInstaller(true)]
public class ThisServiceInstaller : Installer
{
public ThisServiceInstaller()
{
using (ServiceProcessInstaller procInstaller = new ServiceProcessInstaller())
{
procInstaller.Account = ServiceAccount.LocalSystem;
using (ServiceInstaller installer = new ServiceInstaller())
{
installer.StartType = ServiceStartMode.Automatic;
installer.DelayedAutoStart = true;
installer.ServiceName = "NetworkSharingIPv6";
installer.DisplayName = "Network Sharing IPv6 DHCPv6";
installer.Description = "Performs automatic DHCPv6 invocation on the listed interfaces to share IPv6 connectivity with them.";
this.Installers.Add(procInstaller);
this.Installers.Add(installer);
}
}
}
}
}