C# Remote Control

Hi all,

If you want create a button in your app to open a remote control.



using System.Diagnostics;

 private void RemoteControl()
        {
            
            Process rdcProcess = new Process();
            rdcProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\cmdkey.exe");
            rdcProcess.StartInfo.Arguments = "/generic:TERMSRV/192.168.12.252 /user:" + "BBreen" + " /pass:" + "Password1";
            rdcProcess.Start();

            rdcProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\mstsc.exe");
            rdcProcess.StartInfo.Arguments = "/v " + "192.168.12.252"; // ip or name of computer to connect
            rdcProcess.Start();
        }

Comentários

Mensagens populares