synchronizing time with w32tm.exe


  1. EdN
    Posts : 2
    Windows 7
       #1

    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 Computer


  2. Posts : 5,642
    Windows 10 Pro (x64)
       #2

    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 Computer


 

  Related Discussions
Our Sites
Site Links
About 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 21:46.
Find Us