To clarify, what I want is to create an RDP session on the server, without having to open up an RDP client and connect to port 3389 on the server and log in. I want to create this RDP session at boot and run a GUI app. (Sidenote: I have heard about srvany, which would work except that I need to control the GUI app via AutoIt scripts, and I don't think that would work.)

Is there any way to do what I'm looking for? I know that what I want is possible with Linux, because I can create any number of X11 sessions. Is there something like this for Windows?

This is on a terminal server, if that is relevant.


You could create a scheduled task on the server that would run "start /b /min mstsc myfile.rdp", where myfile.rdp is a pre-saved RDP file with stored username and password. Then have a login script for the login information in your script that launches your GUI then disconnects the RDP session (using tsdiscon).


Why on earth would you want to use RDP for this? There are many other ways to accomplish it, with perhaps the most obvious being putting on a computer startup script using the local group policy.

Are you also aware that running a GUI app at boot will be pre-logon, meaning that it won't really be able to any GUI type stuff (even the GUI type stuff you're trying to do)?

  • Perhaps he wants to be able to connect to application after the system is started. – Zoredache Jul 29 '09 at 20:34

Well, to connect up to a terminal server and get a session, you'll need an RDP client somewhere in the mix, however...

Can you launch the RDP client, configure the settings (server name, log in, etc) and Save the connection? At this point you should be able to double click the connection and be logged in.

Then, add a shortcut to that RDP client connection file from your Startup group, and you should at this point be logged into the server shortly after logging into the desktop.

It almost sounds like you're wanting something a little more along the lines of Application Hosting or Citrix-y or something, though.

Edit: I was under the impression that this was for a user to use, but re-reading it, it looks like you're wanting an automated way of doing a TS login, then running a GUI app, possibly pressing some buttons on it with a script, and then being done... is that the case?


Can’t you add a start-up entry on the client to run mstsc /v target ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy