# A script to change date and time after windows 10 starting



## bachusteam (Nov 18, 2017)

Hi, i'm new here and i need a script like in this old topic: https://forums.techguy.org/threads/...te-and-time-before-starting-a-program.985824/ , but i need for windows 10 with automatic date and time adjust, coz i have a laptop and each time i close the time is delay, i try all tutorial from internet to make the setings and to change bios battery with a new one and the problem is the same. and the only way to ajust time is to click right on time and go to ajust and press update.

if you can help me to make a .bat like in that old topic but to work on windows 10 with automatic adjust time and date to execute by click on it each time after windows is open will be great.


----------



## managed (May 24, 2003)

One of these free programs will keep you computer time accurate :-

http://www.thewindowsclub.com/free-time-synchronization-software-windows


----------



## jenae (Mar 17, 2013)

Hi, this works on my win 10:-

@Echo off
w32tm /config /manualpeerlist:time.windows.com
net stop w32time && net start w32time
w32tm /config /update
w32tm /resync /force

Copy into notepad, save it to desktop, call it time.bat, right click to "run as administrator"


----------



## bachusteam (Nov 18, 2017)

ty all for reply, solve


----------



## managed (May 24, 2003)

What did you do to fix it ?

(if you're sure it's Solved please mark it so with the button at the top of your page).


----------



## jenae (Mar 17, 2013)

Hi, i wrote that little script in a hurry, it does work, however the windows time service is set to start manually(trigger), so the cmd can hang stopping a service that is not started, best to run this:-

@Echo off
w32tm /config /manualpeerlist:time.windows.com
net start w32time
w32tm /config /update
w32tm /resync /force

Must right click, and "run as administrator".


----------

