@echo off
echo autor OAK
@echo off
echo --------------------------------
@echo off
echo setup time resync every one hour
@echo off
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 300 /f
@echo off
echo --------------------------------
echo setup w32time auto startup
@echo off
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time /v Start /t REG_DWORD /d 2 /f
@echo off
echo --------------------------------
@echo off
net time >>d:testtimeLog.txt
net time \\192.168.2.66 /set /y>>d:testtimeLog.txt
net stop w32time
net start w32time
w32tm /resync
pause
-------------------------------------------------------------------------------------------------------------------------------