windows - 如何在 Windows 上与 NTP 服务器同步时间

标签 windows cmd registry ntp

我正在尝试找到一种方法,每 x 次将我的机器 (win 7/8.1/TH) 时间与 NTP 服务器同步。 即每 1 小时同步一次时钟。

我知道有一种方法可以通过在注册表中配置一些东西来实现。

另一个好的解决方案是每 x 次自动运行一个 .bat 文件,其中将包含

w32tm /config /update /manualpeerlist:" + NTPServerAddress

但如果可能的话,我更喜欢 reg 解决方案。 谢谢!

最佳答案

在这里找到解决方案 link

基本上你只需要去HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\ NtpClient\SpecialPollInterval 并将值更改为您想要的间隔。

在(从 cmd)之前启动 w32Time 服务很重要:

net start W32Time

关于windows - 如何在 Windows 上与 NTP 服务器同步时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32179446/

相关文章:

windows - WiX Burn Bootstrapper - 无法检测注册表项

c++ - 如何枚举进程中所有命名管道的名称?

excel - 使用VBA运行WinSCP脚本

c++ - 在 C++ 中查看 system() 调用的输出

windows - PS : Emulate CCleaner "Uninstall" tool to list programs installed on PC

windows - 在 Windows XP 或 Windows 7 中更改主题(静默)

windows - Windows 服务器上的分析工具

python - 如何从批处理文件写入 Windows 网络共享?

windows - GIT 获取多个存储库的

c# - 避免注册表 Wow6432Node 重定向