最近搞了一些和windows服务的打交道的事情,所以牵扯到安装卸载windows服务安装和卸载,把已经使用过的命令记录下来,备忘。

语法:sc create | delete | config 服务名 [参数]
主要参数列表:
  start= demand|boot|system|auto|disabled|delayed-auto  //启动类型
  binPath= BinaryPathName                //可执行文件路径
  depend= 依存关系(以 / (斜杠) 分隔)
  DisplayName= <显示名称>                //屏幕显示名称

C:\Documents and Settings\www.wangxudong.com>tasklist
//类似于linux下的ps

安装服务
sc create svnservice binpath= "d:\p\wangxudong.com\bin\svnserve.exe --service -r e:\repos" displayname= "svnservice" depend= Tcpip
sc config svnservice start= auto
删除服务
sc delete svnservice
修改配置
sc config svnservice binpath= "d:\p\wangxudong.com\bin\svnserve.exe --service -r e:\repos" displayname= "svnservice" depend= Tcpip
设置为自启动
sc config svnservice start= auto
启动服务
net start svnservice

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2021-07-23
  • 2022-12-23
  • 2021-08-11
  • 2021-09-27
  • 2022-01-14
猜你喜欢
  • 2021-09-04
  • 2022-02-25
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-08-13
相关资源
相似解决方案