Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: synchronizing time with w32tm.exe


08 Aug 2011   #1
EdN

Windows 7
 
 
synchronizing time with w32tm.exe

I run the following script, %windir%\system32\mysync.bat, in my startup menu.
What I want to do is resync the clock everytime I start up my desktop computer.

REM mysync.bat
REM synchronizes the clock
%windir%\system32\sc.exe start w32time
%windir%\system32\w32tm.exe /resync


It doesn't work. Why?
If I make a shortcut to mysync.bat and click on it
it works if I run it as administrator, but not otherwise.
How can I make the above script run with administrative privileges?

My System SpecsSystem Spec
.

08 Aug 2011   #2

Windows 8.1 Pro (x64)
 
 

Why don't you just use the Task Scheduler?
Its what its there for.

Task - Create to Run a Program at Startup and Log On

Or you could let Windows handle it like it already does. There is already a task in Task Scheduler that handles updating the time.
My System SpecsSystem Spec
Reply

 synchronizing time with w32tm.exe




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:30 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33