Skip to content

Instantly share code, notes, and snippets.

@umer936
Created February 11, 2018 07:15
Show Gist options
  • Save umer936/ce3cf1e2667bd5885ea6577f451d8935 to your computer and use it in GitHub Desktop.
Save umer936/ce3cf1e2667bd5885ea6577f451d8935 to your computer and use it in GitHub Desktop.
Windows/Linux Synctime
@echo off && net start w32time && w32tm /resync /nowait && C:\Windows\System32\w32tm.exe /resync && net start w32time && w32tm /resync /nowait && C:\Windows\System32\w32tm.exe /resync
@umer936
Copy link
Author

umer936 commented Feb 11, 2018

Basically just restarts the Windows timekeeping service twice and asks to resync from Internet Time. This is used to keep clocks happy when dualbooting Windows and Linux. You must have internet access before running this script.

I had this script in my startup folder C:\Users\**Username**\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (easily accessible by opening "Run" and typing shell:startup). Then I had a shortcut to the script on my Desktop in case my internet didn't connect in time and I needed to run it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment