Jump to content
Sign in to follow this  

Change te time on a remote computer

Recommended Posts



The code belows checks if a server fnws1 exist an if so sets my computer time to the server time.

$f_fnws1 = Run(@ComSpec & " /c net time \\fnws1 /set /y", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

$line_fnws1 = StdoutRead($f_fnws1)

$err_fnws1 = StderrRead($f_fnws1)

if StringLen($err_fnws1) > 0 Then

$answer = MsgBox(52,"Network Problem!", "server fnws1 is offline" & @CRLF & "Click *YES* to continue" & @CRLF & "This computertime will not be synchronised to fnws1 if you continue")

if $answer = 7 Then




Does anybody know how to do the opposite?

I mean set the server to time to my computer time?



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.