Monday, August 24, 2015

How to issue a time resynchronization in Windows - cmd/batch

 Hello again, I'm back. I found some spare time to add some updated tricks concerning technology, and general tips for Windows or GNU/Linux. :)

I've been having some problems with the time synchronization in Windows 7, which required more often synchronization. So after some googling around, I came up with this little batch commands:
echo Current date/time: %date%_%time%
%windir%\system32\sc.exe start w32time task_started
%windir%\system32\w32tm.exe /resync
echo Fixed date/time: %date%_%time%
pause

Save it as a .bat file and run it as an administrator (right-click on file > Run as administrator).
It's nothing much, pretty dirty scripting I confess, but it does get the job done, at least in my case. I hope it will help someone else too.

See ya!

No comments: