使用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
主要参数列表:
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