Wednesday, November 9, 2016

How can I sync my computer clock to Historian’s computer clock using an ArchestrA Object?

Question: How can I sync my computer clock to Historian’s computer clock using an ArchestrA Object?

Answer: The below script can be inserted into an ArchestrA Object to do the task.

dim netTime = new System.Diagnostics.Process;

netTime.StartInfo.FileName = "net.exe";
'this sets the the local computer's time to be the same as a computer called Hist
' The word Hist can be changed to any computer name, another example would be CompanyAHist.
netTime.StartInfo.Arguments = "time \\Hist /SET /YES";

netTime.Start();



For more information or for customer technical support, visit us at Logic Support