mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 17:11:52 +01:00
Let's just get this merged instead of having a massive PR Original PR: tgstation/tgstation#26534
29 lines
638 B
C#
29 lines
638 B
C#
using System.ComponentModel;
|
|
using System.Configuration.Install;
|
|
using System.ServiceProcess;
|
|
|
|
namespace ServerService
|
|
{
|
|
[RunInstaller(true)]
|
|
public partial class ProjectInstaller : Installer
|
|
{
|
|
public ProjectInstaller()
|
|
{
|
|
InitializeComponent();
|
|
serviceInstaller1.BeforeUninstall += ServiceInstaller1_BeforeUninstall;
|
|
}
|
|
|
|
private void ServiceInstaller1_BeforeUninstall(object sender, InstallEventArgs e)
|
|
{
|
|
}
|
|
|
|
private void ServiceInstaller1_AfterInstall(object sender, InstallEventArgs e)
|
|
{
|
|
using (ServiceController sc = new ServiceController(serviceInstaller1.ServiceName))
|
|
{
|
|
sc.Start();
|
|
}
|
|
}
|
|
}
|
|
}
|