Service Startup

How can I make sure the service would not start unless a certain program is running?

Thanks,
exhuserAsked:
Who is Participating?
 
serialbandConnect With a Mentor Commented:
Yes, Windows 7 and even Windows 8 uses sc.  It's not exclusive to the servers.
0
 
jcimarronCommented:
exhuser--
I think that would depend on the service.  
Is the Service normally in the Stopped status just after boot?
What problem is caused when the service starts without the certain program?
0
 
exhuserAuthor Commented:
No the service starts regardless and I need to make a dependency. The problem is the dependent program is not running as a service...
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
serialbandConnect With a Mentor Commented:
You could run the dependent executable as a service.

sc create newservice binpath= "<path_to_the_executable>"

From http://support.microsoft.com/kb/251192
0
 
jcimarronConnect With a Mentor Commented:
exhuser--
The reference from serialband may not be applicable to Win 7, although I have not tried it.
This reference from Oracle seems applicable to apps other than Oracle's.
http://blogs.adobe.com/acdc/2010/07/setting_windows_service_depend.html
0
 
McKnifeConnect With a Mentor Commented:
It's applicable.
And with
sc config newservice depend
you could afterwards define dependencies and that's all.
0
All Courses

From novice to tech pro — start learning today.