1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-24 04:04:29 +00:00

service installer

This commit is contained in:
Kyle Spearrin
2017-05-16 12:55:21 -04:00
parent 10a98e4a12
commit e2e769bb6f
3 changed files with 3655 additions and 16 deletions

44
src/Service/Installer.cs Normal file
View File

@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using System.Configuration.Install;
namespace Service
{
[RunInstaller(true)]
[DesignerCategory("Code")]
public class Installer : System.Configuration.Install.Installer
{
private IContainer _components = null;
private ServiceProcessInstaller _serviceProcessInstaller;
private ServiceInstaller _serviceInstaller;
public Installer()
{
Init();
}
private void Init()
{
_components = new Container();
_serviceProcessInstaller = new ServiceProcessInstaller();
_serviceInstaller = new ServiceInstaller();
_serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
_serviceProcessInstaller.AfterInstall += new InstallEventHandler(AfterInstalled);
_serviceInstaller.ServiceName = "bitwarden Directory Connector";
Installers.AddRange(new System.Configuration.Install.Installer[] { _serviceProcessInstaller, _serviceInstaller });
}
private void AfterInstalled(object sender, InstallEventArgs e)
{
}
}
}