Sign in to follow this  
Followers 0

Change te time on a remote computer

1 post in this topic


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  
Followers 0