Any way to override .NET Windows Service Name without recompiling?

前端 未结 5 2039
别跟我提以往
别跟我提以往 2021-01-29 23:39

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 anyw

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 00:03

    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"
    

    Reference: http://support.microsoft.com/kb/251192

提交回复
热议问题