2
0
Each and every time on startup my computer is showing wrong time. So I started using w32tm /resync /force
command to synchronise time from internet. I have configured my system to run this cmd script on startup. But running this script with administrator privileges only could update the time. Please help me to run a batch script to run as administrator on startup.
I also tried making a shortcut to batch, set its properties>advanced to run as administrator and then move the shortcut to the startup directory.But I couldn't bypass the prompt.
1in the task scheduler, check the box on the General tab that says "run task with highest privledge". this will make it run as admin. Also, on the Conditions tab, check "start only if the following network connection is available", and select "Any Connection". this will ensure that you can sync when the task is run. – Frank Thomas – 2017-08-14T18:23:06.230
So when you say "I have configured my system to run this cmd script on startup" does this mean you are putting a script in the
/Startup
folder or are you running as a scheduled task? – Pimp Juice IT – 2017-08-14T18:23:22.0301
In addition to what Frank said, the trigger of Task Scheduler could be At Startup and from the
– Pimp Juice IT – 2017-08-14T18:26:37.420General
tab you can also select the box labeled Run whether user is logged on or not. Have a look at https://superuser.com/questions/1005192/problems-scheduling-a-task-on-windows7/1005216#1005216@McDonald's I used shell:startup command in run and pasted the script there – Nevin Raj – 2017-08-15T05:55:59.987
So rather than having it run from the
– Pimp Juice IT – 2017-08-15T11:46:54.643shell:startup
location, schedule it to run from Task Scheduler instead & be sure to use the options for the task as my answer shows in the link of my above comment in the Task Scheduler Properties section. Just createC:\Scripts
& put it there instead & point the job to it. From theTriggers
tab of the job, have it run At Logon from the drop down. See screen shot here for example: https://i.imgur.com/icI0n4P.png but read over the Task Scheduler Properties from the link on my answer in the above comment I left too. Let me know how it goes.Nevin - What did you ever determine with this? Did you see may suggestion and try it or use another suggestion per one of the other answers or what? – Pimp Juice IT – 2018-03-09T23:10:00.127