Last active
April 19, 2020 13:38
-
-
Save toml01/1110ae5a6dfed1409ee820b80e6cec1b to your computer and use it in GitHub Desktop.
Automatic clock 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
REM For this to work, you need to run it as admin | |
REM Create a shortcut of this file, go to Properties -> Shourcut -> Advanced -> Run as admin | |
REM Point the .vbs file to the shortcut | |
w32tm /resync |
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
'Put this file at %AppData%\Microsoft\Windows\Start Menu\Programs\Startup for it to run at startup | |
Set WshShell = CreateObject("WScript.Shell" ) | |
WshShell.Run "C:\dev\clock_sync.bat.lnk", 0 'Must quote command if it has spaces; must escape quotes | |
Set WshShell = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment