Duncan McClean
Duncan McClean

Reputation: 192

Open a Remote Session from C# Form

I'm creating a small Windows Form app so I can click on my servers and remote into them. I have setup a button and have the following code for when they click on it.

Process.myProcess = new Process();
Process.Start("mstsc", "/v:192.168.0.110 /f");

However, when I press F5, Visual Studio presents me with these errors.

I'm not entirely sure how to fix them.

Upvotes: 0

Views: 528

Answers (1)

opewix
opewix

Reputation: 5083

The class Process is located in System.Diagnostics namespace. Add using System.Diagnostics before your code or just use direct class name:

System.Diagnostics.Process.Start("mstsc", "/v:192.168.0.110 /f")

Upvotes: 1

Related Questions