Please give me a working code for achieving the time synchronization using w32tm.exe in C#.net. I already tried. Code shown below.
System.Diagnostics.Process p;
string output;
p = new System.Diagnostics.Process();
p.StartInfo = procStartInfo;
p.StartInfo.FileName = "w32tm";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.Arguments = " /resync /computer:xxxxx977";
p.Start();
p.WaitForExit();
output = p.StandardOutput.ReadLine().ToString();
MessageBox.Show(output);
But i am getting the following error The specified module could not be found. (0x8007007E). and my requirement also wants to redirect the standardoutput for the success message.