有什么方法可以覆盖.NET Windows服务名称而无需重新编译? [英] Any way to override .NET Windows Service Name without recompiling?

查看:100
本文介绍了有什么方法可以覆盖.NET Windows服务名称而无需重新编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows服务可执行文件,我知道它是用.NET编写的,我需要使用其他服务名称进行安装以避免冲突。安装不会提供指定服务名称的信息。如果我只能访问该二进制文件,那么在用installutil安装该文件时,是否仍要覆盖该服务名?

I have a windows service executable that I know is written in .NET which I need to install under a different service name to avoid a conflict. The install doesn't provide anyway to specify a service name. If I only have access to the binary, is there anyway to override the service name when I install it with installutil?

推荐答案

您必须使用InstallUtil?以下是使用sc可以执行的操作的命令:

Do you have to use InstallUtil? Here are the commands to do what you want using sc:

sc create MyService binPath= "MyService.exe" DisplayName= "MyService"  
sc description MyService "My description"

参考: http://support.microsoft.com/kb/251192

这篇关于有什么方法可以覆盖.NET Windows服务名称而无需重新编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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