What's the best way to set a windows service description in .net

前端 未结 5 916
离开以前
离开以前 2021-02-18 16:12

I have created a C# service using the VS2005 template. It works fine however the description of the service is blank in the Windows Services control applet.

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-18 16:52

    Create a ServiceInstaller and set the description

    private System.ServiceProcess.ServiceInstaller serviceInstaller = 
      new System.ServiceProcess.ServiceInstaller();
    this.serviceInstaller.Description = "Handles Service Stuff";
    

提交回复
热议问题