.net – 如何安装同一Windows服务的多个实例

我创建了一个窗口系列

它从Web配置文件获取服务的名称.

我使用以下链接从webconfig获取价值.
http://www.codeproject.com/KB/dotnet/MultipleInstNetWinService.aspx

为了安装我的Windows服务,我只需点击图标并安装
再次,我更改配置文件中的值并重新制作我的应用程序.

再次我尝试安装,它显示错误像指定的服务已经存在.

如何安装同一Windows服务的多个实例?

谢谢,
POOJA

您需要将服务可执行文件复制到单独的目录,并使用InstallUtil.exe为其提供不同的服务名称.

听起来你在the linked article错过了这一节

From a command prompt,you’ll need to use InstallUtil to install both
instances of your service. For instructions on how to use InstallUtil,
see 07001. Once you’re done installing the
service instances,you’ll have something like the services console
above where Service Instance 1 and Service Instance 2 are created from the same executable,only installed from different directory locations with a different service name.

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...