Hello,
How can be synchronize dates of two computers.
I tried this using net time command but this works fine in Console
application but fails in web application.
Can any help me out.
My code is as follows
FileStream stream = File.Create( @"C:\batch.bat" );
byte[] b = System.Text.Encoding.ASCII.GetBytes( @" net time
\\machinename-with-whom-to-sync /set /yes" );
stream.Write( b, 0, b.Length );
stream.Close( );
Process p1 = new Process( );
p1.EnableRaisingEvents = false;
p1.StartInfo.FileName= "C:\\batch.bat";
p1.StartInfo.CreateNoWindow = true;
p1.StartInfo.UseShellExecute = false;
p1.Start( );
p1.WaitForExit( );
Thanks,
Sushi