views:

201

answers:

1

Hi

I would like to automate the login to a terminal server using Remote Desktop. In the past you could create an RDP file and open it to launch a connection. However, with the changes in security the password in the RDP file is now ignored and the user is prompted to enter it. I want to avoid this prompt and have the session launched automatically. I do not have access to the workstations using the Remote Desktop Connection so I cannot save the password ahead of time. I was thinking of building a small exe which would be downloaded from a web server to automate this process but cannot find any information on how to handle the password. Does anyone know how I can get mstsc.exe to use the password I supply?

Thanks Simon

A: 

I really quite like the Terminals application from CodePlex (http://terminals.codeplex.com). I've been using it for about a year now to manage all the connections to my servers. This application allows me to store my credentials for any connection, which are encrypted using my secret "master password" as the key.

At any rate, it automates my login. I just click on whichever connection I want, and it loads it in a new tab within Terminals.

Now, you may find that an application such as Terminals meets your needs. If, instead, you want to go even further with the automation and really take control of a terminal services client, you may be interested in the source code of Terminals.

The project references a COM library that contains a component that is a complete terminal services client. The RDPConnection class is a reasonable example of using this client to connect/disconnect, copy files, and handle errors with the component. You can take a look at the class and sort out the relevent details for your effort.

Good luck!

kbrimington
I will look at the source code perhaps it will help. I will not be using terminals because the ultimate goal is have users click a link on a webpage to download a small file to launch a Remote Desktop Connection. The users should not have to install any extra software to make this happen. I just need to automate the existing Remote Desktop Connection built into Windows.Thanks.
Simon White
@Simon: Consider mentioning the requirement to automate the login from the Web in your question. I'm fairly sure my response is pretty much useless in a Web scenario. Terminals uses rich client components that you'll not find an easy way to launch from a hyperlink.
kbrimington