Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Service Startup

Posted on 2014-03-11
6
Medium Priority
?
190 Views
Last Modified: 2014-03-28
How can I make sure the service would not start unless a certain program is running?

Thanks,
0
Comment
Question by:exhuser
6 Comments
 
LVL 50

Expert Comment

by:jcimarron
ID: 39922113
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
 

Author Comment

by:exhuser
ID: 39922121
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
 
LVL 31

Assisted Solution

by:serialband
serialband earned 750 total points
ID: 39922271
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 50

Assisted Solution

by:jcimarron
jcimarron earned 375 total points
ID: 39922278
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
 
LVL 57

Assisted Solution

by:McKnife
McKnife earned 375 total points
ID: 39924328
It's applicable.
And with
sc config newservice depend
you could afterwards define dependencies and that's all.
0
 
LVL 31

Accepted Solution

by:
serialband earned 750 total points
ID: 39925014
Yes, Windows 7 and even Windows 8 uses sc.  It's not exclusive to the servers.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question