第一种   -  安装服务时自定义服务名称:
(注意 binpath= 和路径之间的那个空格)
sc create 服务名称  binpath= "D:\Service.exe" displayname= "显示名称" depend= Tcpip start= auto (启动类型)


第二种  -   安装目录服务:

C:\Windows\Microsoft.NET\Framework\v4.0.30319   下 2.0也有
InstallUtil.exe D:\Service.exe

卸载服务

InstallUtil.exe /u D:\Service.exe

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-02-07
  • 2021-10-04
  • 2022-12-23
  • 2022-01-06
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-02-07
  • 2021-06-02
  • 2022-01-04
  • 2021-10-02
相关资源
相似解决方案