把以下命令复制另存为一个 .bat文件,放在电脑启动项中,解决一些老电脑停电后时间不准的问题。
@echo 正在尝试注册改大参数
@echo off
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config" /v MaxNegPhaseCorrection /t reg_dword /d 999999999 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config" /v MaxPosPhaseCorrection /t reg_dword /d 999999999 /f
@echo 正在启动W32TM服务
@echo off
sc config w32time start=auto >null
net start w32time >null
@echo 正在尝试设置服务器
@echo off
w32tm /config /syncfromflags:manual /manualpeerlist:"time-b.nist.gov" /reliable:NO
@echo 正在同步
@echo off
w32tm /resync >null
w32tm /resync >null
@echo 同步完毕
@echo off
ping 127.0.0.1 -n 6 >null