Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Terminal Services (MSTSC) - How to AutoLogon or edit RDF file

Status
Not open for further replies.

dean12

MIS
Oct 23, 2001
273
US
I'm sitting on a Win XP Pro workstation. I need to connect to a number of remote systems (generally Win Server 2003).

Ideally I would like to fire off RDC by a command line string:

C:\Windows\system32\mstsc.exe "parameters"

and on that parameter list I need to specify the machine to connect to, a username, password, and perhaps a domain. Basically I want to connect right to the remote and not worry with the login screen.

But it doesn't look like you can pass that kind of information on a command line. Looks like the next best thing is a file containing the information - an RDF file.

So with a connection file, I can say:

mstsc.exe "connectionfilename"

and off we go. OK, that's basically OK except that the password to access the remote system changes periodically. Since I don't want the user to have to know how to work with a connection file (RDF) and I don't want the user to get a login screen, what I'm looking for is a way to get that silly login information into MSTSC. The RDF file holds the password as an encrypted string so I don't know how to construct that.

Any ideas?
 
I'm not sure what group policy settings really have to do with the issue. The password does change on a periodic basis so I have to deal with that. We know the password, we have it saved someplace where we can get to it. Worse case the user has to type it in but I'd just as soon not have to do that.

Regardless, I don't want the user to have to setup all these connection files either.

So the question remains: How to fire off RDC (mstsc.exe) and connect to the remote without involving the user in any dialog.
 
I don't like to say "never", but I don't think this is possible using Remote Desktop, short of editing each RDF file for each computer whose login password has changed. I'd be happy to be proven wrong, though.

Perhaps another remote application will accept command line parameters, like VNC etc?
 
Yea, I'm with you on that - I don't think it is possible...

But ya know, there are a lot of folks out there smarter than me! Thus the question of maybe someone coming up with a creative solution OR may using an alternative product (like your VNC suggestion but I don't think VNC is the way to go either).
 
So basically you want to dbl click a RDP shortcut on youre desktop and have it open up a login to the remote computer correct ? I do this daily, ive got 15 remote computers i connect to daily and i simply dbl click the connection on the desktop and it opens up the remote connection no passwords needed to re-enter or usernames to enter. Is this what you're trying to do ?
 
Well no, not exactly.

I have a database and it has the following:

System Name
UserName
Password
Domain
IP Address

Information in this database is subject to change. New entries, password changes, deleted entries, etc.

Now the user needs to connect to a system using RDC. He is running our in-house application. He chooses an entry from the database. Click the "Connect" button. When he clicks that button, we want to fire up MSTSC, pass the needed information and connect to the remote system. All basically transparent - the user doesn't have to type in a user ID, doesn't have to type in a password, etc.

Now I do understand that you can create a "connection file"
and reference this when using RDC. No problem with that, but someone has to create the file. We could create the file programatically, it's just a text file and it's format is straightforward. The only issue is that the password stored in the RDF file is encrypted and I don't know how to get that stored in an RDF file that we are just going to create on the fly so to speak.

Does that make sense?
 
Yes it makes sense, let me talk to a co-worker of mine and see what he says.
 
If you have a look at the XP "Help and support", under "Provide information for automatic logon", you will find:

Depending on the policies of your network or the configuration of the terminal server to which you want to connect, you might be prompted to supply your password upon connection, even if you have saved the password you typed in the Remote Desktop Connection dialog box

I just cannot find which policy they are talking about, but I guess this is the relevant difference between your two environments ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top