Solved

NT services startup order

Posted on 2003-12-03
5
10,578 Views
Last Modified: 2010-02-09
Does anyone knows how to control the startup sequence of services in NT?

I'm using Windows Server 2003, but I beleive it's the same as in 2000, and my problem is the following, I want my Internet connection to fire first than anything else, because if it doesn't, my DNS server will fail, and then the SMTP also fails amongst many other things that depend on it. My Internet connection is not a Windows service, I have placed a shortcut in the startup folder, how can I make it a service so it loads even if I don't login?

After that, is there any way I can control not only the order in which these services kick, but also only allow other services to start if the Internet connection is active. I've seen an article some time ago ago this, but can't find it now.

Thx.
0
Comment
Question by:Nelson_Pires
  • 3
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 9865572
Services start (or start to start) BEFORE anything in the startup folder.  The only way to make your "internet connection" start first (and I assume this is some sort of broadband connection application supplied by your ISP) would be to have it run as a SERVICE itself and make these other services dependent on it.

A tool like FireDaemon (http://www.firedaemon.com) or Microsoft's SVRANY may be helpful here.

***********************************************************************************
                                   COMMENT DISCLAIMER
***********************************************************************************
   CAUTION - CAUTION - CAUTION - CAUTION - CAUTION - CAUTION - CAUTION - CAUTION
***********************************************************************************
                           READ THIS COMMENT AT YOUR OWN RISK

 This helpful comment MAY include straight talk relating to or about your question.
   If you are easily offended by such talk, please disregard this comment in its
                                        entirely.
***********************************************************************************
                               Thank you for your cooperation
***********************************************************************************
0
 

Author Comment

by:Nelson_Pires
ID: 9895299
Thanks jhance, FireDaemon can make my auto-dial exe into a service, what about changing DNS server, SMTP Delivery Agent and SMTP Receiver services to depend on it? These 3 services should only start after my FireDaemon service starts, preferebly after a small delay, to ensure the connection is active.
0
 

Author Comment

by:Nelson_Pires
ID: 9947599
Does anyone knows about this? How to make a service depend on another service, in other words, how to make service 2 start only if service 1 has started sucessfully.
0
 
LVL 12

Accepted Solution

by:
zoofan earned 125 total points
ID: 10215295
Use at your own risk!!! The registry can be nasty if you dont pay attention to detail.

Open the registry using regedit.exe
Find the ServiceName you wish to add a dependency too by name as a registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\"SERVICE NAME"
For an example on how multiple entries are made look at  the "browser" service which requires the lanman server and lanman workstation services.
Click on Edit, then Add Value
Create a new value called "DependOnService". This value name is case-sensitive. The data type should be REG_MULTI_SZ.
Click OK to close the Add dialog
In the Data dialog box, enter the exact name for the service you wish too add as the denpendency. The service name must appear exactly the same as it does in the Windows Services panel.
Click Ok to close the dialog box.
Close the registry entry.
Reboot

The order at boot does not matter so long as the dependencies are set to start at boot-up,  windows will load the dependencies for each service first before attempting to load the main one.  If the dependencies fail the main one will as well.  If you need more help with this let me know.

Zoofan
0
 

Author Comment

by:Nelson_Pires
ID: 10439670
Thx, Zoofan, this is very good info on my problem, strange no one seams to come up with a tool to do this sort of thing yet.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

12 Experts available now in Live!

Get 1:1 Help Now