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

John Allen allen at vo.lu
Mon Aug 21 14:41:50 UTC 2006

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:
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()
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.


More information about the questions mailing list