通常情况下,Windows服务的服务名(ServiceName属性)在编码的时候就指定了的:
this.serviceInstaller1.DisplayName = "theService";
this.serviceInstaller1.ServiceName = "MyService";
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
有什么办法可以允许在服务安装的时候指定其服务名?即同一个服务程序允许以不同的服务名进行安装?