I want to connect to a remote machine using mstsc.exe without username and password. As I want to connect it without username and password then it should get connect with lock session status.
So I want something like this,
- User will enter IP address and hit connect button.
- Machine should get connected with lock status.
I already tried below code but it did not work.
Process rdcProcess = new Process();
rdcProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\mstsc.exe");
rdcProcess.StartInfo.Arguments = "/v " + "123.0.0.1 /public"; // ip or name of computer to connect
rdcProcess.Start();
Is there any way user will be able to do this using C#?
Thanks
-Sanket