Jump to content

Change te time on a remote computer


Recommended Posts

Hello,

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

CODE
$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

Exit

EndIf

EndIf

Does anybody know how to do the opposite?

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

Thanks

Kurt.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...