Hi Members,
I am using below code in both window App and web app. and copy to my NTP server. window application is run on server but we application not working.
Please help.....
void setTime(string timeInYourSystemFormat)
{
var proc = new System.Diagnostics.ProcessStartInfo();
proc.UseShellExecute = true;
proc.WorkingDirectory = @"C:\Windows\System32";
proc.CreateNoWindow = true;
proc.FileName = @"C:\Windows\System32\cmd.exe";
proc.Verb = "runas";
proc.Arguments = "/C time " + timeInYourSystemFormat;
try
{
System.Diagnostics.Process.Start(proc);
}
catch
{
MessageBox.Show("Error to change time of your system");
Application.ExitThread();
}
}
Server Time Change
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Lalit RaghavRank #1,306 · 1.3K reputationPosted Jun 27, 2015, 12:03 AM EDT