搞了个批处理,修改系统ntp服务器为cn.ntp.org.cn和更新频率为每小时。并启动时间服务。目前是三个文件,想把注册表的东西直接搞进批处理里面去,请问如何弄啊?- @ ECHO OFF
- regedit /s 授时频率.reg
- regedit /s 授时地址.reg
- sc config W32Time start= auto
- sc start W32Time
- cls
- @echo --------------------------------------------------------------------------------
- @echo ###### 已成功调整授时服务的相关配置 ######
- @echo --------------------------------------------------------------------------------
- cls
复制代码 两个注册表文件内容分别如下:
授时地址.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Parameters]
"NtpServer"="cn.ntp.org.cn,0x9"
授时频率.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpClient]
"SpecialPollInterval"=dword:00000e10
"SpecialInterval"=dword:00000001 |