安装卸载Windows系统服务服务,修改服务里文件执行路径

简介:
最近搞了一些和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









本文转自 yuanzhitang 51CTO博客,原文链接:http://blog.51cto.com/yuanzhitang/504297,如需转载请自行联系原作者
目录
相关文章
|
11天前
|
C# Windows
.NET开源免费的Windows快速文件搜索和应用程序启动器
今天大姚给大家分享一款.NET开源(MIT License)、免费、功能强大的Windows快速文件搜索和应用程序启动器:Flow Launcher。
|
11天前
如何隐藏windows10系统任务栏右下角的语言输入法图标?
如何隐藏windows10系统任务栏右下角的语言输入法图标?
|
1月前
|
Linux Shell Windows
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
|
22天前
|
Shell Windows
Windows服务器 开机自启动服务
Windows服务器 开机自启动服务
13 0
|
17天前
|
安全 Windows
安装MyEclipse遇到错误提示 Failed to find a Main Class in “C:Windows\Temp\“时的解决方案
安装MyEclipse遇到错误提示 Failed to find a Main Class in “C:Windows\Temp\“时的解决方案
22 1
|
27天前
|
开发框架 数据安全/隐私保护 开发者
HBuilder开发者必备!Windows上传IPA文件的软件分享
HBuilder开发者必备!Windows上传IPA文件的软件分享
21 1
|
8天前
|
Windows
【Windows】 手写脚本更快编辑hosts文件
【Windows】 手写脚本更快编辑hosts文件
9 0
|
29天前
|
Linux 数据安全/隐私保护 Docker
linux和windows中安装emqx消息服务器
linux和windows中安装emqx消息服务器
27 0
|
30天前
|
物联网 Windows
安装windows 10操作系统
安装windows 10操作系统
44 1
|
1月前
|
Windows
windows server 2019 安装NET Framework 3.5失败,提示:“安装一个或多个角色、角色服务或功能失败” 解决方案
windows server 2019 安装NET Framework 3.5失败,提示:“安装一个或多个角色、角色服务或功能失败” 解决方案