Last active
August 29, 2015 14:07
-
-
Save vuolter/6f687315b7ed587e4985 to your computer and use it in GitHub Desktop.
Fix date time on device with bad cmos battery. Schedule it at system startup. Windows only.
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
::Date fixup v0.1 by Walter Purcaro <[email protected]> | |
@ECHO off | |
SET dummydate=02-10-2014 ::proper date to set | |
SET failyear=2000 ::wrong year shown on start | |
IF %date:~6% LEQ %failyear% ( | |
DATE %dummydate% | |
"%windir%\system32\sc.exe" start w32time task_started | |
"%windir%\system32\w32tm.exe" /resync | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment