更改服务名称 [英] change the service name

查看:172
本文介绍了更改服务名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有两个具有相似功能的Windows服务,但是两者都略有不同.

我已经安装了第一个,而当我尝试安装第二个时,第一个已被删除....
并且服务名称不同,但仍然无法同时安装两者.

问候,

Hi,


I have two windows services with similar functionality but there are slight difference is there in both of them.

i have installed the first one and when i try to install the second one, the first one is getting deleted....
and the services names are different, still i am not able to install the both of them.

Regards,

推荐答案

您要在两个位置更改ServiceName.

1.在您的服务等级中
看起来像这样.ServiceName="MyNewService1";

2.在您的安装程序类中. ServiceName将在"InitializeComponent"方法内可用.
它看起来像"this.serviceInstaller1.ServiceName ="MyNewService1";

它将正常工作.


问候,
Senthil S
You want to change the ServiceName in two place.

1. In you Service Class
It will look like this.ServiceName = "MyNewService1";

2. In your Installer Class. ServiceName will be available inside the "InitializeComponent" method.
It will look like "this.serviceInstaller1.ServiceName = "MyNewService1";

It will work fine.


Regards,
Senthil S


这篇关于更改服务名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆