Service Startup

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

Thanks,
exhuserAsked:
Who is Participating?
 
serialbandCommented:
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
serialbandCommented:
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
 
jcimarronCommented:
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
 
McKnifeCommented:
It's applicable.
And with
sc config newservice depend
you could afterwards define dependencies and that's all.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.