Solved

Service Startup

Posted on 2014-03-11
6
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 30

Assisted Solution

by:serialband
serialband earned 250 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 50

Assisted Solution

by:jcimarron
jcimarron earned 125 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 55

Assisted Solution

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

Accepted Solution

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

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Suggested Courses

632 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