Mac Win 双系统时间校准

背景

黑苹果电脑安装 win10 和 mac 双系统后,windows 上的时间一直都是早 8 小时的。在使用 windows 时看时间很不方便,于是本文提供一种 windows 开机自动校时的方法

解决方案

新增脚本 sync_time.bat,此脚本主要是在做同步时间

@echo off
if "%1"=="h" goto begin
start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin

net stop w32time
w32tm /unregister
w32tm /register
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config" /v MaxNegPhaseCorrection /t reg_dword /d 0xFFFFFFFF /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w32time\Config" /v MaxPosPhaseCorrection /t reg_dword /d 0xFFFFFFFF /f
net start w32time
w32tm /resync
w32tm /resync

#pause

将此脚本设置为开机自启
win + r 后输入:shell:startup,将 sync_time.bat 放到此目录下,即可实现开启自启脚本,实现时间校准。

posted @   meicanhong  阅读(670)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
点击右上角即可分享
微信分享提示