You've already forked EventLogLoader
mirror of
https://github.com/romanlryji/EventLogLoader.git
synced 2025-12-05 23:18:25 +02:00
C# application
This commit is contained in:
33
EventLogApp/EventLogServiceInstaller.cs
Normal file
33
EventLogApp/EventLogServiceInstaller.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration.Install;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EventLogApp
|
||||
{
|
||||
[RunInstaller(true)]
|
||||
public partial class EventLogServiceInstaller : System.Configuration.Install.Installer
|
||||
{
|
||||
ServiceInstaller serviceInstaller;
|
||||
ServiceProcessInstaller processInstaller;
|
||||
|
||||
|
||||
public EventLogServiceInstaller()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
serviceInstaller = new ServiceInstaller();
|
||||
processInstaller = new ServiceProcessInstaller();
|
||||
|
||||
processInstaller.Account = ServiceAccount.LocalSystem;
|
||||
serviceInstaller.StartType = ServiceStartMode.Manual;
|
||||
serviceInstaller.ServiceName = "EventLogService";
|
||||
Installers.Add(processInstaller);
|
||||
Installers.Add(serviceInstaller);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user