This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
SXS20240115/SRC/MESAgent/MESAutoLoader/AutoLoaderService_Base/ProjectInstaller.cs

102 lines
3.0 KiB
C#
Raw Normal View History

2024-01-23 14:01:04 +08:00
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace AutoLoaderService_Base
{
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
#region
public ProjectInstaller() : base()
{
// 此為元件設計工具所需的呼叫。
InitializeComponent();
// 在 InitializeComponent() 呼叫之後加入所有的初始設定
}
// Installer 覆寫 Dispose 以清除元件清單。
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
// 為元件設計工具的必要項
private IContainer components;
// 注意: 以下為元件設計工具所需的程序
// 您可以使用元件設計工具進行修改,
// 請勿使用程式碼編輯器進行修改。
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;
}
}
[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 AutoLoader Service (Production)";
_ServiceInstaller1.ServiceName = "MES AutoLoader Service (Production)";
//
// ProjectInstaller
//
Installers.AddRange(new Installer[] { _ServiceProcessInstaller1, _ServiceInstaller1 });
}
#endregion
}
}