Files
SMTPProxy/smtpproxy.net/ProjectInstaller.cs

32 lines
989 B
C#

using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
namespace smtpproxy.net
{
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
private readonly ServiceProcessInstaller processInstaller;
private readonly ServiceInstaller smtpproxyInstaller;
public ProjectInstaller()
{
processInstaller = new ServiceProcessInstaller
{
Account = ServiceAccount.NetworkService
};
smtpproxyInstaller = new ServiceInstaller
{
StartType = ServiceStartMode.Automatic,
ServiceName = "SMTPProxy.NET",
DisplayName = "SBC SMTP Proxy Service",
Description = "Intercepts, logs, filters, and relays local SMTP traffic based on JSON profile rules."
};
Installers.Add(processInstaller);
Installers.Add(smtpproxyInstaller);
}
}
}