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); } } }