Windows 安装服务 的两种方式

第一种   -  安装服务时自定义服务名称:
(注意 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

posted @ 2018-10-17 15:52  Rocken.li  阅读(11531)  评论(0编辑  收藏  举报