本篇文章主要介绍了"SC命令---安装、开启、配置、关闭 cmd命令行和bat批处理操作windows服务",主要涉及到方面的内容,对于Windows Server 2008jrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播感兴趣的同学可以参考一下:
一、cmd命令行---进行Windows服务操作1、安装服务sc create 服务名 binPath= "C:\Users\Administrator\Des...
一、cmd命令行---进行Windows服务操作
1、安装服务
sc create 服务名 binPath= "C:\Users\Administrator\Desktop\win32srvDemo\win32srvdemo\Debug\win32srvDemo.exe"
注:服务名:指创建的Windows服务名
binPath:指Windows服务程序的路径
2、配置服务
sc config 服务名 start=AUTO
注:start=AUTO (自动)
start=DEMAND (手动)
start=DISABLED (禁用)
3、开启服务
net start 服务名
4、关闭服务
net stop 服务名
5、删除服务
sc delete 服务名
二、bat批处理---进行Windows服务操作
(新建一个txt文件,把后缀改成.bat文件)
1、创建、配置、开启服务
@echo.服务启动......
@echo off
@sc create 服务名 binPath= "C:\Users\Administrator\Desktop\win32srvdemo\win32srvdemo\Debug\win32srvdemo.exe"
@net start 服务名
@sc config 服务名 start= AUTO
@echo off
@echo.启动完毕!
@pause
2、关闭服务
@echo.服务关闭
@echo off
@net stop 服务名
@echo off
@echo.关闭结束!
@pause
3、删除服务(删除前要关闭服务)
@echo.服务删除
@echo off
@sc delete 服务名
@echo off
@echo.删除结束!
@pause
二、SC命令
网友博客:http://blog.csdn.net/ddjj_1980/article/details/7493045
转载:http://blog.csdn.net/moruna/article/details/9190733
以上就介绍了SC命令---安装、开启、配置、关闭 cmd命令行和bat批处理操作windows服务,包括了方面的内容,希望对Windows Server 2008jrs看球网直播吧_低调看直播体育app软件下载_低调看体育直播有兴趣的朋友有所帮助。
本文网址链接:http://www.codes51.com/article/detail_277487.html