If you have a Windows computer and you want to keep its clock set
accurately from time servers on the internet, you have come to the
right place. NTPTime is a simple time setting client that runs on
Windows NT/2000/XP as a service and Windows 95/98/ME as a hidden
program. Both the executable and the source code are freely
available.
This file was last updated on March 9th, 2010. The update was only to change the contents to reflect the forced move to comcast.net from att.net due to worldnet shutting down their personal web servers. The downloadable files linked to from here do not reflect these changes (I didn't feel like repackaging them - sorry :-). This file was previously updated on April 30, 2004. If you think you might be looking at an old copy, you can check the master version at http://tomhorsley.com/software/ntptime/ntptime.html. Table of Contents
This document and the NTPTime program and source code are all Copyright © Tom Horsley, 1997-2004. All rights reserved. The right to unlimited distribution and use of this program is granted to anyone who agrees to keep the copyright notice intact and not alter the program. Translation: You want changes in the program, make 'em yourself, but don't go distributing the new version with my name on it (or with your name on it either, since you didn't write most of it :-). If there are changes you would like to see distributed, by all means send 'em in to me, and if I like 'em I'll incorporate them in the next version. |
Get Started FastFor the impatient: First read about finding a time server. You will need to have one or more server names handy in the next step.Download the file ntp43bin.zip. Unzip
the files, open a command window, and cd to
that directory. Run the |
NTPTime Features
NTPTime runs as a service on Windows NT/2000/XP which must be installed by a user with administrator privileges (I have only tested it on NT 4.0 and XP, but it should work fine on 2000). On Windows 95/98/ME it runs as hidden window, and you will probably want to add it to your start menu or to the registry as a program to be run when the machine boots. If you connect to the internet via dial up networking, NTPTime can be configured to lurk in the background until it notices you have an active internet connection, then talk to the server to set the time. This lurking (after much blood sweat and tears) will never trigger an autodial on your computer (I hope - Microsoft seems to keep "helpfully" making more and more events trigger autodialing). Instead, it waits for you to connect for some other reason, then asks for the time. If you actually want it to autodial, then don't tell it to wait for a dial up connection, and Windows will probably trigger the autodial when NTPTime tries to set the time. If you don't like the idea of a background process cluttering up your system all the time, then you can configure it to set the time only once, then exit. This way it only clutters up your system until the first time you connect to the internet. NTPTime can keep a log file showing when it adjusted the clock and how much it adjusted it by. This log will also record any errors which make the program exit, so the log is valuable if you are having trouble getting it to work.
|
--help | Pop up a window with a summary of these options. |
--noras | Never install a dependency on the RAS service |
--install | Install ntptime.exe a service on windows NT/2000/XP |
--installq | Just like install, but does not popup a message on success (the quiet install option). |
--uninstall | Remove ntptime.exe as a windows NT/2000/XP service. |
--uninstallq | Just like uninstall, but does not popup a message on success. |
--version | Popup a window with version and copyright information. |
--w95 | Run as a Windows 95/98/ME hidden window (rather than a service) even when the current OS is Window NT/2000/XP. |
|
A few other files are also included in the distribution: |
ntpreg.reg | A sample registry file. You can edit this and use it to install the registry entries without needing to run the control panel. |
ntpstart.reg | Registry file for installing ntptime.exe in the
RunServices key so it will automatically run at startup on
Windows 95/98/ME systems. |
ntpxpcat.reg | A registry file for use on Windows XP to install the control panel
in the new XP Category view. May need some editing depending on
where you install ntptime.cpl |
sample1.bat | A sample batch script sent to me by Jouni Aro for installing NTPTime as a service. |
sample2.bat | A different sample batch script from Peter Yasuda for remotely installing NTPTime as a service (this will need updating for the new registry keys that versions 4.0 and later need). |
ntp.adm | A sample group policy editor template from David Nemeth which system administrators may find handy for controlling access to the NTPTime control panel. |
ntpquick.bat | My own attempt at a batch script to install NTPTime. |
TPTime Control Panel Servers Page |
NTPTime is a simple time client, so it does not attempt to average
the time from multiple servers in any way. The list simply provides
alternate servers to try if the first server doesn't work. The
complete retry algorithm is explained in the description for the
Retry page.
The server names may be symbolic names or numeric IP addresses. |
TPTime Control Panel Settings Page |
Wait for dial up network connection: if checked, NTPTime will check periodically to see if a dial up network connection is active, and set the time only when it finds one. |
|
|||||||||||||
Exit after setting time once: when NTPTime successfully sets the time, it will exit. | ||||||||||||||
Set time every: set the time periodically according to the specified interval. | ||||||||||||||
Activate sanity check: do not set the time if the adjustment required is greater than specified. (Too big adjustments trigger retry). | ||||||||||||||
Allowed NTPTray interactions: allow ntptray to monitor NTPTime's state and/or send set time requests. |
The Exit after setting time once and Allowed NTPTray interactions parameters can be used to set the time only on demand. The set once parameter works best for Windows 95/98/ME where you can just run NTPTime whenever you want to set the time, and the Set Time parameter works best for Windows NT/2000/XP where NTPTime has to run as a service with administrator privileges, but any user can run ntptray. If you set the poll interval to a very large number, then NTPTime will only set the time when someone requests the time be set from ntptray. |
TPTime Control Panel Log Files Page |
Enable logging: check this to tell NTPTime to write information about what it is doing to daily log files. |
|
|||||||||||||
Log file directory: specify the directory where the log files will be written. | ||||||||||||||
Automatically remove old log files: check this to have NTPTime automatically remove the oldest log files when writing new files. |
NTPTime tries to be as unobtrusive as possible. When running, it
never shows any windows or pops up any messages. The only way you can
ever see any feedback about what it is doing is to enable logging and
examine the log files it produces.
The log file names are of the form YYMMDD.ntp (where YYMMDD are replaced with the year, month, and day). They are simple text files with moderately cryptic gibberish written to them as NTPTime does its thing. (Note: This is not a Y2K bug. This is just a way to generate unique names). All the timestamps in the files, and the file names themselves are generated using UTC time, with a new log file generated each time a new day shows up in UTC time. |
TPTime Control Panel Retry Page |
Exit after too many errors: check this to set the number of errors which will make NTPTime exit (otherwise it will keep trying forever). |
|
|||||||||||||
Min time between retries: always wait at least this long between retry attempts. | ||||||||||||||
Max time between retries: never wait any longer than this before doing another retry. | ||||||||||||||
Compute next retry interval: the Add, Multiply, and Divide parameters are used to compute the new retry time from the last retry time R. The formula is R = (((R + Add) * Multiply) / Divide) |
Any kind of an error will trigger a retry attempt (unable to look up
server name, no response from server, time adjustment too big, etc).
NTPTime will try each server in the list once, and if none of them
works, it will compute a new retry time according to the above
algorithm. The min time is used for the initial retry time, and if
the algorithm comes up with a number less that min or greater than
max, it will use the min or max time.
When NTPTime successfully sets the time from some server, it resets the server back to the primary server, and the retry time back to the min time, so it will always start in the same state. |
TPTime Control Panel Advanced Page |
Startup Delay: wait this long when starting up before attempting to set the time. |
|
|||||||||||||
Dial up delay: wait this long after a dial up networking connection is made before attempting to set the time. | ||||||||||||||
Set once delay: wait this long after successfully setting the time before shutting down (if the Exit after setting time once option is selected on the Settings page). | ||||||||||||||
Use nonstandard NTP protocol version: set this to change the protocol version number in the time request packets NTPTime sends out. | ||||||||||||||
Use nonstandard NTP port number: set this to request time from a different port number on the server. |
The startup and set once delay times are mainly useful when running
NTPTime as a service on NT/2000/XP. The service manager gets upset if
a service stops too soon after it was just started. These parameters
allow you to placate the service manager while still using Exit
after setting time once.
The dial up delay might be useful if your system is usually downloading your home page immediately following a dial up connection. You can induce NTPTime to wait a bit for things to quiet down before setting the time. On the other hand, if you are just dialing up, checking mail, then disconnecting, you wouldn't want it to wait too long. The protocol version and port number settings are mainly for testing. Possibly the protocol version setting could get NTPTime to talk to some older server that doesn't recognize version 3 requests, but I'm not sure if there might be other differences that NTPTime won't handle right. Use at your own risk. |
TPTime Control Panel Obscure Page |
Listen for NTP replies on specific port: Normally NTPTime lets Windows pick a random UDP port number it will use to listen for replies from the NTP server. Select this option to pick a specific port number to listen on. |
|
|||||||||||||
Disable detailed packet content error checks: As of NTPTime version 4.2, the reply packets from the NTP server are checked to see that the server is running at a valid stratum and believes itself to be synchronized. Select this option to disable those checks. |
Listening for replies on a specific port may be of use if you are
behind a firewall that normally blocks all incoming ports. If your
administrator can allow UDP packets for a specific port through the
firewall, you can use this setting to convince NTPTime to listen on
that allowed port number and set time from a server outside the
firewall.
Disabling the errors checks might be useful if you are talking to a server that really isn't properly synced, but is still useful for getting all your computers to agree on the same time (even if it is the wrong time). You almost certainly want to enable the sanity check on the Settings Page if you disable these checks. |
Registry EntriesNTPTime uses the registry keyHKEY_LOCAL_MACHINE\SOFTWARE\ntcli\NTPTime\4.3 to store
the following values:
A sample registry file, The You can also look at and modify these entries using the Windows registry editor program. |
TPTray taskbar appIf you want to monitor and control NTPTime from your taskbar, you
can place a shortcut to Note that running |
TPTray taskbar icons |
By default, NTPTray runs as a taskbar icon application. It shows different icons based on the current state of NTPTime: |
is displayed when NTPTime is initializing. If you have a direct network connection, you may never see this, but if NTPTime is waiting for the first dial-up network connection, this will be the state it is in. | |
is displayed once NTPTime successfully sets the time. | |
is displayed when NTPTime had some kind of problem setting the time (the server didn't respond, the time information it got from the server was bad, etc). You can look in the log file to see the specific problem. | |
is displayed when NTPTime is not running. This will also be the state if NTPTime is configured to not allow NTPTray to monitor the state changes. While in this state, NTPTray checks every few seconds (interval configurable in options) to see if NTPTime has started. |
A left button click on the icon will request NTPTime to set the time right away. A right click will bring up the menu. |
TPTray popup menu |
Right click on the tray icon to bring up the menu. |
Synchronize Now Is the same as left click. It asks NTPTime to set the time right away. | |
Log Files... pops up a dialog to use for opening a log file. Selecting a file will run notepad (or whatever other application you choose in the options) to view the log file. | |
Control Panel... pops up the NTPTime control panel. If you change NTPTime settings, the start and stop menu items are handy for restarting NTPTime so it will use the new settings. | |
Options... pops up the NTPTray options dialog box. | |
About... pops up the NTPTray about dialog box. | |
Start NTPTime on Windows NT/2000/XP, this asks the service control manager to start the NTPTime service (if you don't have administrator privileges, this probably won't work). On Windows 95/98/ME it simply attempts to run NTPTime as a normal application (if it can't find it in your search path, this won't work). | |
Stop NTPTime much like the start menu, this behaves differently on different versions of windows, either asking the service manager to stop the service, or sending a WM_CLOSE message to the top level window named NTPTime. | |
Exit Tray Application make NTPTray exit. |
TPTray Options dialog |
Choose Options... from the menu to bring up the options dialog. |
If you really like being annoyed, you can ask NTPTray to popup a
message box when it sees the state change. You can pick which new
states should popup the message here.
To be slightly less annoying, it won't popup the message if the state change was caused by something you just told it to do (such as clicking Stop NTPTime in the menu). |
|
When NTPTime isn't running, NTPTray checks every few seconds to see if the events have been created and NTPTime is up again. You can control the frequency of those checks here. | |
When you view log files from the menu, it starts a separate program, passing it the name of the logfile you selected. You can choose a program other than notepad.exe here. | |
When you click on OK, the options take effect
and are also copied to your local registry
settings where they will be remembered and reloaded the next time
you run ntptray.exe . |
TPTray About dialog |
Choose About... in the menu to bring up the about dialog. |
The about dialog looks like this:
For extra fun, clicking on the icon or the url at the bottom will take you to the NTPTime home page. |
TPTray command line options |
You can run |
-help | Pop up a window with a summary of these options. |
-poke | Ask NTPTime to set time now. This option replaces the
ntpoke.exe program (ntptray.exe simply exits
after making this request). |
-popshut -popwarn -popinit -popok |
These options set the various popup message requests from the options dialog. |
-pollseconds=int | This options sets the polling interval from the options dialog. |
-logviewer=progname | This option sets the name of the program used to view log files. |
TPTray registry entries |
NTPTray uses the (per user) registry key
|
Value | Format | Description |
PopShut | dword | Non-zero means popup a message when NTPTime shuts down. |
PopWarn | dword | Non-zero means popup a message when NTPTime has a problem setting the time. |
PopInit | dword | Non-zero means popup a message when NTPTime starts initializing. |
PopOk | dword | Non-zero means popup a message when NTPTime sets the time successfully. |
PollSeconds | dword | The number of seconds to wait between checks to see if NTPTime is back up when NTPTime is down. |
LogViewer | string | The name of the program used to view log files. |
Year 2000Now that the Y2K hysteria has diminished, I don't get too many questions about it anymore, but for the record, here is the Y2K lowdown:The NTP protocol has nothing in it that makes 2000 special, and the time is set by calling the SetSystemTime() service of Windows, so the only way NTPTime could have year 2000 problems is if Windows has year 2000 problems with that service, and you'd have to ask Microsoft about that. If you are really interested, you can find a near infinite amount of Microsoft Y2K information at: http://www.microsoft.com/y2k/default.htm (or there was at one time, Microsoft seems to have removed this link). On the other hand, sometime in the year 2036 the NTP timestamp will rollover, and NTPTime will stop working. At that time the code in ntp-long-fixed.cpp which uses the JAN_1_1900 macro will have to be fixed to use a different base time (I don't actually know the correct value, but I could probably figure it out from the various NTP rfc documents, but since I have 30 years or so, it didn't seem critical). A sufficiently fanatical Y2K auditor might notice that the log file names created by NTPTime have a 2 digit year as part of the name. This is just a way to make unique names, they don't mean anything else and the names aren't used for any processing of any kind. |
Installing NTPTimeNTPTime can be installed many different ways, but however it is installed and used, it will need to know a name or IP address of a time server, so the first step is to find a time server you can use.You should go through a two step process to find the best server to use. First contact your ISP or the administrators of any corporate network you may be attached to and find out if they are already running an NTP server. If they are, then that's the one you'll want to use, because it is sure to be closer to your machine than the internet at large. Many internet router boxes already have the ability to act as NTP servers - your network admins may just be able to activate this feature in their router if they haven't already. In my case, the Adelphia gateway that my cablemodem talks to happens to be willing to talk NTP, so I can point at it. If you have cable or DSL, you might be able to do the same thing. If there is no local NTP server available to use, then you'll have
to consult the NTP Home Page for
pointers to publicly available NTP servers. There is no reason, given
the accuracy of this program and PC clocks in general to talk to the
most accurate "stratum 1" servers. Use one of the "stratum 2" or
below servers. Pick one which has low ping times or which
Note: Windows 2000 and XP come with their own time setting
service. You might be able to use the same time server. Check the
registry key:
Next, you might as well install the control panel and use it to set the registry entries NTPTime will need to operate. Typically, you will want this to show up in the system control
panel so you can double click it just like any other control panel
app. To do this, find out where your version of windows stashes its
current crop of control panel apps by searching the system drive for
files named . On Windows XP, the control panel has a new Category layout. The NTPTime control panel will only be visible if you switch to the Classic View of the control panel. If you would like to get the NTPTime control panel wedged into the Category view of the control panel, then you can do it with some registry magic. Look in the registry key with the amazing name of: HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows\ CurrentVersion\ Control Panel\ Extended Properties\ {305CA226-D286-468e-B848-2B2E8E697B74} 2 Now create a DWORD value under that key with the name:
and give it the value 6 (which is the category code for date and time). That value name should be the full path name to where you copied
the The If that's all too complicated, you can actually leave the
In any case, once you get the control panel installed, you will want to run it to tell NTPTime which server to use and set the parameters which tell it just how to operate. On Windows NT/2000/XP
you probably want to install NTPTime as a service. You must be
running as an administrator to do this. First, copy the
If that worked, since you are already in a command window, you can now start the service by running the command:
and the service should start up, set the time, generate log files, and all that jazz. (You can check the log files to see if it is really working). If you like graphical interfaces, you can also start the service from the Services control panel. Once installed as a service, NTPTime should automatically start running each time you boot the system. If you don't want to run NTPTime as a service, you can also run it
the same way 95/98/ME run it (as a normal windows program) if you
give it the On Windows 95/98/ME there is no service manager, so NTPTime runs as a regular windows program, but it doesn't display a window. It always runs as a hidden window that will only show up in the task list, but not on the screen or the taskbar. The simplest way to install NTPTime is to make a shortcut to it in
the If you have a multi-user system, and you want NTPTime to run even if no one is logged in, you can also make a value under the registry key:
This will start NTPTime when the machine boots, without waiting for anyone to login. Of course, if you don't want NTPTime cluttering your system all the time, you can simply make a start menu entry for it so you can easily run it whenever you want to set the time. If you also choose the Exit after setting time once option on the control panel Settings Page, then NTPTime will merely set the time when you run it, and exit right away. |
UnInstalling NTPTimeThe Installing NTPTime section
covers several different ways you might want to install and use
NTPTime. This uninstall section simply describes the most obvious
things to look for. The basic idea is to read the install section
backward, and if it says run the On Windows NT/2000/XP, the first thing you need to do is make sure the NTPTime service is stopped. You can either bring up the services dialog (located either in the control panel or under administrative tools from the control panel) and look for NTPTime, stopping it if it is running, or you can start a command window and issue the command: NET STOP NTPTime Of course, neither of these things will work if aren't running as administrator. Once you have stopped the service, cd to the directory where the
current version of .\ntptime --uninstall On Windows 95/98/ME, you don't need to uninstall a service, but you should make sure the old ntptime program isn't running. Bring up the task manager by pressing Ctrl-Alt-Del on the keyboard, and if NTPTime appears, click on it, then push the "End Task" button. If you have startup folder shortcut pointing to
At this point, whichever operating system you are using, you
should be able to delete the old If you are uninstalling an old version so you can install a new version, this is a good time to install the new version (so the new control panel will be able to copy your old registry settings before you remove them). Once you have installed the new version, or if you just want to
get rid of the old version completely, look for registry entries
under If you want to utterly eradicate NTPTime, you can delete the
If you had a copy of the If you were using the NTPTray program, you should also check to
see if you have a Startup folder shortcut to it, and delete the
shortcut and if you ever configured any NTPTray options, you will
want to delete the
|
Download NTPTimeThere are three.zip files
available for download:
|
Build NTPTimeThe
I build these on Windows XP with Visual C++ 6.0 and the Microsoft Platform SDK from around January 2002 (sometime after that, Microsoft started forcing you to install all of .NET, and I'm avoiding that, so I'll probably be on VC++ 6.0 forever). I don't make any promises about other versions of the compiler or older libraries, and if you want to use Borland or GNU compilers, you are completely on your own. If you don't have VC++ environment variables installed, you may
need to run the Each of the If you are addicted to the Visual Studio environment, you can set
these up to build with it fairly simply by just including all the
source files in each directory in a new project. Make sure you use
Win32 Application as the kind of project for
For You should also consult the link lines in each Makefile to see what libraries need to be included (the standard set of libraries VC++ provides by default won't always work). |
WarningsBecause NTPTime runs as a service that starts when the system boots, network drives and connections may not be properly setup when it starts. It probably isn't a good idea to try to install NTPTime to run from a network drive or point the log directory to a network drive. I originally developed this under Windows NT 4.0 and I now run this on my Windows XP system at home, and it hasn't caused any problems (since the one when I was running NT where it would hang the service control manager :-). But remember, this is free software, it has only as much support as I feel like providing. User beware. On the other hand if you really want something fixed, the source is available too, so you can always fix it yourself. I have also tested it on Windows 95 and Windows 98 and it seems to work fine there as well. I have never run Windows ME or Windows 2000 (other than brief tests), but I don't know of any reason it shouldn't work with them. Versions of NT prior to 4.0 are a bigger question. I have my doubts about it working there. Yes, there is a program named To set the time, NTPTime needs to talk to an NTP server using the TCP/IP UDP protocol. Many firewalls won't relay UDP packets, so if you are behind such a firewall, your best bet is to convince the powers that be to run an NTP server on the firewall, then you can talk to that. As of NTPTime version 4.2 there is also the obscure setting to tell NTPTime to listen for replies on a specific port. This may be useful to get through some firewalls. NTPTime uses the win32 Some governments seem to be constantly fiddling with the daylight
savings time standards for their country. As a result, windows may
not be able to set the correct timezone for your computer. Microsoft
has a utility program available on their web site for editing
timezone and daylight time parameters. You can look for http://www.microsoft.com/windows/download/tze.exe
(but that link seems to have disappeared), or you might simply go to
http://www.microsoft.com/ and
use their search feature to look for If you are running this, and also running some kind of high overhead game that hogs every resource it can get, I make no promises about any interference this might cause with games. Best bet is not to run it at the same time you are playing a game. On Windows NT, the On Windows 95 and 98, NTPTime runs as a completely hidden windows program. If you don't see anything happen when you start it up, that's perfectly normal. The only sign that it is running will be the log file entries it creates (if you configured the registry to write log files), and the entry that will show up for it in the task list you get when you type Ctrl-Alt-Delete. You can use the task list to select NTPTime and do an "End Task" if you need to shut it down (which is slightly less drastic than rebooting the computer to shut it down :-). |
ReferencesSome useful resources for NTP information are:
|
FeedbackYou can reach me with feedback at Enhancement requests are also welcome, most especially ones which come with source code patches to implement the enhancement (which is one of the reasons I make the source available). Just remember, I do this for learning and fun, not to make a profit, so don't expect lightning quick response (for example: it was about 2 years between 3.0 and 4.0). I only have a limited amount of free time to kill fooling with this program (but at least I can keep track of it very accurately now). Any fury or flames about this program should be directed at the fool who decided to run an unsupported free program on his or her computer, not at me :-). |
Deep ThoughtsWhy does the world need another NTP client? It doesn't really, I just wanted to learn about writing Windows NT services, and I wanted the service I wrote to be something "real" rather than one of the dummy samples you often see in Microsoft's documentation. I also thought NTP was interesting, so I chose that as my project.In addition to learning about services, I also took this opportunity to use exceptions and some of the other new C++ features. That turned out to be fun as well, and I learned a lot about how to make using exceptions a safe thing to do when you also need to worry about releasing critical sections, freeing up sockets, etc. So, if yet another NTP client offends you, I apologize, but I found it a useful project, and as long as I had it, it seemed a shame not to clean it up a bit and make it available for anyone else who wants it. Once I suckered myself into making the initial release, NTPTime sort of took on a life of its own, so I'm now up to version 4.3. Finally, the real subversive motive behind this program is using the free software I write as bait to lure unsuspecting people to my home page, where they can read about the political ideas that will revolutionize governing for generations to come! They will then write their congresscritters about it. The congresscritters will steal the ideas so they can take the credit, and pretty soon the whole country will be running with my ideas. Funny thing, this part doesn't seem to have happened yet :-). |
ChangesThe initial release of NTPTime was version 2.1. This was a console program primarily useful as an NT service and not well suited to running on 95/98/ME. Version 2.2 was an internal version I never fully released. It didn't do much other than some improved (or different, anyway) error logging and making the NT service dependencies be a little smarter about RAS. Version 2.3 was a bugfix an
minor enhancement release. It no longer required RAS to be installed
on your machine in order to run NTPTime. It loads the
Version 3.0 was mainly a bug fix release, and the control panel first appeared shortly after 3.0.
The control panel was actually a post version 3.0 addition, but since it didn't change ntptime itself, all I did was update this document and add the additional links to the control panel source and executable. That's about it for the major fixes. Other minor things included
document updates and the addition of a sample Version 4.0 has a large backlog of enhancements and bugfixes folded into it.
Version 4.1 was rushed out a few days after 4.0 to fix some bugs that cropped up in the Wait for dial up network connection code. Not only could this code never have worked (I don't understand why it ever did :-), but once I got the bug fixed, I found that I needed to build the RAS connection query code with a older WINVER defined for anything other than Windows XP to be happy. 4.1 also fixed some typos in this document and added a section to the appendix on the registry editor and a few other notes and links as long as I was modifying the html file anyway. Finally, testing Version 4.2 finally showed up a couple of years after 4.1. It adds a new (completely optional) system tray icon application, fixes some bugs, and adds a few other new features.
Version 4.3 is primarily a quick bug fix release. Soon after 4.2 was released, I got reports from several international users that the creation of the ntptray events was failing. I have completely rewritten the code that builds the security attributes for the events to avoid any use of API calls that deal with names of any kind, using lower level functions to get "Everyone", etc. Hopefully this will allow ntptime to create the events no matter what locale it is running in. Christian Bendt was kind enough to test the new code for me and verify that it works on his machine. Also, soon after 4.2 was released, David Mills pointed out the existence of his proposed rfc with guidelines for simple NTP clients. Since the guidelines seem reasonable, I'm implementing the the most important missing feature: the recognition of "kiss of death" packets which servers use to tell clients to stop bothering them. Many of the other recommendations are very close to what ntptime already does, but since I wanted to get version 4.3 out quickly, I didn't do a complete set of rfc-xxxx changes (that gives me something to do for 4.4, and by then rfc-xxxx may be an approved standard with additional recommedations I need to implement). While testing the "kiss of death" support, I found a few ways the service could shutdown and fail to notify the ntptray program. I fixed those, so so odd boundary conditions will no longer confuse ntptray. That's it. Version 4.3 is the most recent version (as of April 30, 2004). |
AppendixThe manual has been filled with references to special bits of Windows and other things that may or may not be familiar to the unknown audience out there, so this appendix tries to cover some of the basic points that might need additional explanation:Since all the NTPTime files
are packed in Several places mention opening a command window. Microsoft keeps changing the name and moving the menu entry around for this. In Windows 95 it was called a MS-DOS Prompt, somewhere along the way (I think in Windows 2000) the name changed to Command Prompt and it moved out of the programs menu and into the accessories menu. Here is where to find the menu entry on Windows 95: Here is what the menu entries look like in Windows XP: If you look around under programs or accessories you ought to be able to find MS-DOS Prompt or Command Prompt somewhere on your system no matter which version of windows you are running. On all versions of windows, if you select the start menu "Run..." option, you should be able to type "command" as the name of the program to run and have it popup a command window. The most convenient way to run programs is to have shortcuts to them in your start menu. You can make new shortcuts by using windows explorer. First right click the start button and choose the Explore option: That will bring up something a lot like this: Double clicking on Programs will take you into that folder. Clicking the folder with the up arrow on it on the toolbar will take you back up one level, etc. Right clicking in the right half of the explorer window will allow you to create new folders or shortcuts, like this: The folder named StartUp under Programs is special. Any shortcuts in there will be run automatically when you login, so this is a good place to make a shortcut to NTPTime if you want to run it a login: On Windows NT/2000/XP you need to know how to find the service manager to start and stop NTPTime (for instance, if you change some parameter with the control panel). This hasn't moved around quite as much as the command prompt, but you might have to wander around to a couple of different places to find it. On Windows NT, the service manager is right in the control panel. On Windows XP, you have to first go through the Administrative Tools icon to see the service manager icon. If you are using the category view in the control panel, you have to look under Performance and Maintenance to find Administrative Tools (are you lost yet?). I'm not sure where it is on Windows 2000, but it is probably in the same general vicinity of one of these. On Windows 95/98/ME you may also need to start and stop NTPTime. Since it doesn't show on the screen, you need to bring up the task list in order to stop it. Press the Ctrl-Alt-Del keys at the same time, and a window like this will pop up where you can select NTPTime and click on End Task: The registry is
mentioned a lot in this document. It is a magic set of files where
Windows stores almost all of its configuration information. There are
two programs available for examining and modifying the registry. All
versions of Windows have a program named On Windows XP, both these versions of the program appear to be identical. These programs are not usually in any predefined menus. The simplest way to run them is to click the Start button and select the Run... choice, then type the program name in the dialog box that pops up. |