打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Scheduling starting a service after another service.

In my experience, the best way to create service dependencies,without rummaging in the registry (something that is not secure, safe,or easily scriptable == repeatable) is to use SC.exe - the servicecontrol utility packaged with every Windows version since Win2003.

You can open a command window and type sc to get the full help, but the gist of it is:

sc create newservice binpath= c:\nt\system32\newserv.exe type= own start= auto depend ="netbios"


/////////////

You have to use the registry editor (as far as I know) to make the service depend on the other server. Locate the dependent service in HKLM\SYSTEM\CurrentControlSet\services, and add an REG_MULTI_SZ value called DependOnService. Put the service name (not the display name, but the same name as it's reg key) as a value.

When you reboot now, Windows will only start your dependent serviceafter the service you made it depend on starts. Likewise, if theservice it depends on fails to start, your dependent service will notstart either.



本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
dos SC远程启动终端服务
Windows服务名称与显示名称的查看及其重要性解析
谁有win8.1的服务优化批处理文件,共享一下
win7(家庭普通版)安装svn服务 [sc] openSCManager 失败 5 拒绝 访问拒绝
用sc.exe命令来管理Windows服务
怎么学电脑
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服