[ntp:questions] Re: ntp startup behaviour under Windows

Richard B. Gilbert rgilbert88 at comcast.net
Mon Aug 21 18:48:57 UTC 2006

John Allen wrote:
> Thanks to all who have provided clarification on the questions I raised. I 
> understand now why (a) logging is to the Event Viewer or the log file, but 
> not both and (b) why failing to connect to the servers doesn't count as a 
> "service failure". So far so good.
> I was aware of the possibilities of using service dependencies to delay the 
> startup of ntp under Windows. There is a KB article about this:
> http://support.microsoft.com/?kbid=193888
> However, on the PC I am currently experimenting with (which is not one of 
> mine), setting up the Internet connection (via a cable modem and DHCP) is 
> very slow, and even setting Spooler and Messenger as dependencies did not 
> always allow ntp enough time to start properly.
> I prefer to use the Meinberg distribution, so I hope Heiko can get Danny's 
> latest fixes into his build soon. In the interim, I'm trying a little 
> kludge, which is to set the ntp service to start manually, and then use a 
> small script to start it after an arbitrary delay:
> ======
> strComputer = "."
> Wscript.Sleep 60000
> Set objWMIService = GetObject("winmgmts:" _
>  & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
> Set colServices = objWMIService.ExecQuery _
>  ("SELECT * FROM win32_Service WHERE Name = 'NTP'")
> For Each objService in colServices
>  errReturnCode = objService.StartService()
> Next
> ======
> This script is saved as a file called something like "startntp.vbs" and 
> included in the Windows "Start" group. This is not elegant, but it does seem 
> to work.
> John 

I don't see why setting up an internet connection should be slow!  Do 
you use a router?  I have a little Linksys BEFSR81 router.  You don't 
get much for $85 but it does act as a DHCP server.  My NTP server is 
internal, running on Sun Solaris (SPARC) and I use W32TIME on the PC's.

More information about the questions mailing list