Solved

Service Startup

Posted on 2014-03-11
6
176 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 27

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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
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 53

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 27

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now