Monorepo/Service.EDMIService/ProjectInstaller.vb
2020-04-06 15:17:03 +02:00

25 lines
696 B
VB.net

Imports System.ComponentModel
Imports System.Configuration.Install
Imports System.ServiceProcess
<RunInstaller(True)>
Public Class ProjectInstaller
Inherits Installer
Private ReadOnly process As ServiceProcessInstaller
Private ReadOnly components As IContainer
Private ReadOnly service As ServiceInstaller
Public Sub New()
process = New ServiceProcessInstaller With {
.Account = ServiceAccount.NetworkService
}
service = New ServiceInstaller With {
.ServiceName = SERVICE_NAME,
.DisplayName = SERVICE_DISPLAY_NAME
}
Installers.Add(process)
Installers.Add(service)
End Sub
End Class