Dec 31, 2009

System time synchronization in xp using w32tm commands

Due to hardware problem, every day system date and time settings were getting lost.
Solution :Specify external time server & other few settings in registry and then run the w32tm command.


Registry settings:
HKLM \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ ParametersHere set following subkeys:1) Type = NTP2) Ntpserver = 1.asia.pool.ntp.org

HKLM \ SYSTEM \ CurrentControlSet \ Services \ W32Time \ Config
MaxPosPhaseCorrection : ffffffff { Earlier it was 3600 (decimal) = 1 hour, I have changed this value to all ffffffff (hex) to have maximum offset i.e. even if time difference is large. }

MaxNegPhaseCorrection : ffffffff { Same as above }
__________________________________
After this run the command

w32tm /resync /rediscover

I have written above command in a batch file and the put that batch file in windows startup. So everytime after PC start it will synchronize with external time source & we get correct time.

Batch file commands :
@ECHO OFF
w32tm /resync /rediscover

No comments: