1
我目前有一個程序可以正確安裝爲服務,但啓動類型設置爲「手動」。我如何設置此應用程序啓動類型=自動?C#安裝服務並設置爲在啓動時自動啓動
3210和JMS是:
namespace JMS {
partial class DocLogicJMS {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.ServiceName = "DocLogic JMS";
}
#endregion
}
}
我添加了更多關於我的問題的信息。我認爲這接近我需要但不完全。 –
但你確實把我放在了正確的軌道上。謝謝。我需要這些行:this.JMSserviceInstaller.StartType = ServiceStartMode.Automatic; this.JMSserviceInstaller.DelayedAutoStart = false; –