I have a client/server application in .NET in which communication between the two is time sensitive and requires both machines to be sync'd.
XP dos, and the version of dos on win2k are different. So some of the commands are different.
IE: winxp is w32tm /resync
win2k is w32tm -s
These are the steps I think I need to do:
1) set sntp server. This currently works on both machines like this
net time /setsntp:<machineName>
2) update the time, and if possible set interval at which it will check to make sure the time is in sync.
win2k - currently doing:
net time stop w32time
w32tm -s (or -once?) -period 65532 (to sync ever 8 hours)
net time start w32time
now this works...the first time when I use -once, but not -s.
Both -s and -once will sync the time after the service is started (unless the -s attempt just failed and is using previous settings from my -once attempt).
However, i set the period to 1440 (to sync every minute) and it doesn't sync every minute. I've set the time ahead and back (knowing that it handles those 2 scenarios differently... i think if its back it slowly syncs and if its ahead it'll do it immediately).
and with winXP this command works :
net time /set /y
however that command does not work on win2k? ? ? ? i get "System error 5 has occured"
I have done research on this system error 5 and can't seem to figure out what the problem is.
Anyways.. seems like there are a lot of examples on the web.. so please.. DON'T POST LINKS!! lol.
I'll save you the trouble to what I've seen and what I've tried....