1.

Solve : w32tm /resync at startup?

Answer»

ok, I created a batch file timesync.bat and added it to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. First, I made it look like this: Code: [Select]@echo off
w32tm /resync
exitHowever, it exited with an error. Messing around with it a bit, I was able to find that the error was "RPC Server is Unavailable". Adding the line "net start w32time" causes it to wait enough time that w32tm worked but DISPLAYED a message that w32time is already running first. The few methods I've found on google to make commands wait SEEM to not WORK in xp or at least not do what I want. How can I make w32tm or timesync.bat wait say 10 seconds before running and then exit?dang, no idears? should this be in the dos forum perhaps? I tried cmd.exe -w %t, doesn't seem to work and /WAIT t doesn't seem to be a valid PARAMETER. I guess letting net start w32time tell me it's already running is tolerable, but there's gotta be a better method.There's an old trick I use since the command.com isn't standard with XP or server 2003. try this.

PING -x localhost (x=number of miliseconds to wait)

Or, if you don't want a loop

Ping 127.0.0.1 -n 1 -w 10000 >NUL

There are 3rd party .com's you can put in your %SystemRoot%\System32 but I haven't taken the time to research any.Here.

http://unattended.msfn.org/files/global/sleep.zipawesome, man, thanks a lot. I even had that windows unattended guide in my bookmarks already, guess I didn't look through it closely enough. and that ping is pretty clever.



Discussion

No Comment Found