How to add dependency on a Windows Service AFTER the service is installed
2024-08-31 02:52:30
his can also be done via an elevated command prompt using the sc
command. The syntax is:
sc config [service name] depend= <Dependencies(separated by / (forward slash))>
Note: There is a space after the equals sign, and there is not one before it. So if you want ServiceA to depend on both ServiceB and ServiceC--that is to say, ServiceA will not start until the other two have started--then you would use this:
sc config ServiceA depend= ServiceB/ServiceC
Edit: Also, if you want to remove all dependencies, you have to use the following syntax:
sc config ServiceA depend= /
Warning: depend=
parameter will overwrite existing dependencies list, not append. So for example, if ServiceA already depends on ServiceB and ServiceC, if you run depend= ServiceD
, ServiceA will now depend only on ServiceD.
最新文章
- JDBC数据库访问操作的动态监测 之 Log4JDBC
- Apache error: 403 Forbidden You don&#39;t have permission to access
- TF-IDF提取行业关键词
- windows下Ruby开发环境搭建
- DOCTYPE对$(window).height()取值的影响
- 《OD学storm》20160827
- codevs 1218 疫情控制
- Python学习笔记2——模块的发布
- Win32下 Qt与Lua交互使用(一):配置Qt下Lua运行环境
- Android 获取图片真实宽高
- C++模板:欧拉函数
- Webpack学习笔记(一)
- 【手记】解决EXCEL跑SQL遇“查询无法运行或数据库表无法打开...”
- Linux中JDK安装教程
- shell脚本学习-循环
- Unet网络
- 高斯消元处理无解|多解情况 poj1830
- 什么是SpringCloud
- JWT总结
- 个性化 UIAlertController