How to remove dependencies between windows services


















Learn more. Windows server dependencies Ask Question. Asked 12 years, 1 month ago. Active 6 years, 9 months ago. Viewed 6k times. I have an application which has 3 services which are dependent on SQL server. These 3 services are dependent services for SQLserver. Jon Seigel Add a comment. Active Oldest Votes. Can you alter dependencies with sc? If so, how? Matt Matt 4, 4 4 gold badges 34 34 silver badges 53 53 bronze badges. Therefore you will have to get some code of your own running in order to monitor in some fashion whether the remote service is running or not, and to get that code running you'll have to allow your service to start with or without the dependency.

It's difficult to prescribe a detailed solution without knowing the purpose of your service, but in principle you probably need your service to have two modes of operation: one where it does nothing except monitor in some fashion whether the remote service on which it depends is running; and the another where it performs its full functionality as well as continuing to monitor the dependency.

This last point is crucial - you will in any case have to monitor the dependency continuously, not just around the time your service is starting, because unlike the single machine situation, the SCM on the remote machine will not prevent the remote service being stopped, as it knows nothing about your dependency on it.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to set up dependencies between windows-services on different servers in same domain Ask Question. Asked 9 years, 3 months ago. SQL server is running on the same machine as the service in question Is there a tool to add a dependency or possibly editing the registry directly?

Improve this question. Rick Rick 1, 2 2 gold badges 12 12 silver badges 6 6 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Community Bot 1. Kip Kip 3, 3 3 gold badges 21 21 silver badges 13 13 bronze badges. If you want to see the existing dependencies before changing them with Kip's method, you can type sc qc YourServiceName — mivk.

Just be careful I just used this and didn't realize that it will overwrite existing dependencies.. So make sure you run the command mivk mentioned first to see any other dependencies first. You can query currently configured dependency for a service by using sc qc [service name] command — gerrytan. If like me, your Service has spaces in the name, enclose it in quotes. If using powershell, make sure you use sc. Show 8 more comments. The details can be found at MS KB article , from which the following is an excerpt from: To create a new dependency, select the subkey representing the service you want to delay, click Edit, and then click Add Value.

Kyle Brandt And I was happy. It dutifully seperatedthe provided input by slashed, realized there was nothing before or after the slash, and remove the service dependencies. Here is a few lines of code that show what I was doing in the PowerShell script. The actual script was actually a PowerShell module, and had a lot more logic to it. You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account.

You are commenting using your Facebook account.



0コメント

  • 1000 / 1000