使用dos命令管理服务

语法: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 GatewayService binpath
=   " G:\公司快捷方式\GatewayServiceTest\GTA.MS.Gateway.Service.exe "  displayname =   " GatewayService "  depend =  Tcpip
sc description GatewayService  
" 该服务以Socket方式对外提供虚拟交易所后台服务功能 "
sc config GatewayService  
type =  interact  type =  own --允许与桌面进行交互
sc config GatewayService 
start =  auto --修改起动方式 
删除服务
sc delete GatewayService 
修改配置
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

转载于:https://www.cnblogs.com/skyrickie/articles/2182227.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值