Tuesday, July 3, 2007

How to remotely connect through Program

How to remotely connect through Program

string sCommand = System.Environment.GetEnvironmentVariable("SystemRoot") + "\\system32\\mstsc.exe";
System.Diagnostics.Process.Start(sCommand, " /v:machinename /w:1024 /h:768");
System.Diagnostics.Process.Start( sCommand, " /v:machinename /w:1024 /h:768");


System.Diagnostics.Process.Start(@\\machinename\rdc\default.rdp);

No comments: