set time date setting automatically every day by running batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
prasadk
Posts: 1
Joined: 10 Oct 2021 00:54

set time date setting automatically every day by running batch file

#1 Post by prasadk » 10 Oct 2021 01:19

hi here i have problem with my windows pc date and time settings

when i start my pc every day it's never update date and time on windows it will showing me every day like 01/01/2014

here i am setting my windows time and date setting with a batch file like this below code

here my request any one change batch code into fully automatic like

if start my windows pc every day & then i run this batch file as run as administrator & then my system time and date should be update automatically as per indian standard time with internet connecting & here i have internet access also to my windows pc

Code: Select all


@echo off
date 10-10-2021

time 09:58:00 AM


aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: set time date setting automatically every day by running batch file

#2 Post by aGerman » 10 Oct 2021 04:31

You would have to create a scheduled task in order to run a batch file automatically with the necessary credentials. However, it's absolutely meaningless because where does the right date and time come from in your command as long as the clock of your PC is wrong?

Better find the reason why this happens. Sounds pretty much like a dead motherboard battery to me.

Steffen

Post Reply