Created
April 8, 2023 07:58
-
-
Save hui-shao/25f049a78483df6041c79e05dac9837a to your computer and use it in GitHub Desktop.
Windows Time Sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit | |
net start w32time | |
w32tm /config /manualpeerlist:"ntp.ntsc.ac.cn,0x1 cn.ntp.org.cn,0x2 time.pool.aliyun.com,0x3 cn.pool.ntp.org,0x4 time.windows.com,0x5" /syncfromflags:manual /update | |
w32tm /resync /rediscover | |
net stop w32time | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment