89 lines
2.8 KiB
C#
89 lines
2.8 KiB
C#
using System.Diagnostics;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace AutoRunService
|
|
{
|
|
[System.ComponentModel.RunInstaller(true)]
|
|
public partial class ProjectInstaller : System.Configuration.Install.Installer
|
|
{
|
|
|
|
// Installer 覆寫 Dispose 以清除元件清單。
|
|
[DebuggerNonUserCode()]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
try
|
|
{
|
|
if (disposing && components != null)
|
|
{
|
|
components.Dispose();
|
|
}
|
|
}
|
|
finally
|
|
{
|
|
base.Dispose(disposing);
|
|
}
|
|
}
|
|
|
|
// 為元件設計工具的必要項
|
|
private System.ComponentModel.IContainer components;
|
|
|
|
// 注意: 以下為元件設計工具所需的程序
|
|
// 您可以使用元件設計工具進行修改。
|
|
// 請不要使用程式碼編輯器進行修改。
|
|
[DebuggerStepThrough()]
|
|
private void InitializeComponent()
|
|
{
|
|
_ServiceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
|
|
_ServiceInstaller1 = new System.ServiceProcess.ServiceInstaller();
|
|
//
|
|
// ServiceProcessInstaller1
|
|
//
|
|
_ServiceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
|
|
_ServiceProcessInstaller1.Password = null;
|
|
_ServiceProcessInstaller1.Username = null;
|
|
//
|
|
// ServiceInstaller1
|
|
//
|
|
_ServiceInstaller1.DisplayName = "MES AutoRun Service";
|
|
_ServiceInstaller1.ServiceName = "MES AutoRun Service";
|
|
//
|
|
// ProjectInstaller
|
|
//
|
|
Installers.AddRange(new System.Configuration.Install.Installer[] { _ServiceProcessInstaller1, _ServiceInstaller1 });
|
|
|
|
}
|
|
private System.ServiceProcess.ServiceProcessInstaller _ServiceProcessInstaller1;
|
|
|
|
internal virtual System.ServiceProcess.ServiceProcessInstaller ServiceProcessInstaller1
|
|
{
|
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
|
get
|
|
{
|
|
return _ServiceProcessInstaller1;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
|
set
|
|
{
|
|
_ServiceProcessInstaller1 = value;
|
|
}
|
|
}
|
|
private System.ServiceProcess.ServiceInstaller _ServiceInstaller1;
|
|
|
|
internal virtual System.ServiceProcess.ServiceInstaller ServiceInstaller1
|
|
{
|
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
|
get
|
|
{
|
|
return _ServiceInstaller1;
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.Synchronized)]
|
|
set
|
|
{
|
|
_ServiceInstaller1 = value;
|
|
}
|
|
}
|
|
|
|
}
|
|
} |