Follow @RoyOsherove on Twitter

How to create your own Auto Login Remote Desktop Application

Speaking of Multiple Remote  Desktops - it's not really that hard to build such an application. Microsoft had a "Microsoft RDP Client Control" ActiveX control that you can use in your apps.

I've even went ahead and implemented a small proof of concept form (you can download it here) that opens a new remote desktop and does an automatic login user your supplied user name and password.

The only "catch" is that the RDP control does not seem to have a method that supplies the user name and password to login - until you dig a little and find out a special interface you need to cast to in order to achieve this functionality (for security reasons, they did not automatically implement that interface on the control - you have to cast to it explicitly).

here's how easy it is to auto login to another machine (note the "clear text" password being sent - there are better ways to do this, but this was the easiest)

rdp.Server = txtComputer.Text;
rdp.UserName = txtUserName.Text;

IMsTscNonScriptable secured = IMsTscNonScriptable)rdp.GetOcx();
secured.ClearTextPassword = txtPassword.Text;

rdp.DesktopHeight = 600;
rdp.DesktopWidth = 800;

Download the full code here.

It was surprisingly easy and reminded me that ActiveX is still a very useful and productive technology which we will all be using for a long time - trash talking it is something which should be done very carefully - this technology enabled real reuse and real "live parts" you can use in windows today and tomorrow.

Trust me when I say you'll be able to write a remote desktop app in Vista in just about the same way I did in 10 minutes - ActiveX.

TypeMock Bundled Up with TestDriven.NET

Cool Tool: vRD - Multiple Remote Desktops in one program