38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
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 SDRGatewayService
|
|
{
|
|
[RunInstaller(true)]
|
|
public partial class ProjectInstaller : System.Configuration.Install.Installer
|
|
{
|
|
public ProjectInstaller()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void serviceInstaller1_AfterInstall(object sender, InstallEventArgs e)
|
|
{
|
|
new ServiceController(serviceInstaller1.ServiceName).Start();
|
|
}
|
|
|
|
//protected override void OnBeforeInstall(IDictionary savedState)
|
|
//{
|
|
// string parameter = "AppServerServiceSource\" \"AppServerServiceFile";
|
|
// Context.Parameters["assemblypath"] = "\"" + Context.Parameters["assemblypath"] + "\" \"" + parameter + "\"";
|
|
// base.OnBeforeInstall(savedState);
|
|
//}
|
|
|
|
//private void serviceProcessInstaller1_AfterInstall(object sender, InstallEventArgs e)
|
|
//{
|
|
|
|
//}
|
|
}
|
|
}
|