I have some problem when I use Remote Desktop, here some description.

  1. I set some application to autorun each time Administrator (console) was login on W2K3 SP2 server
  2. I use Remote Desktop from XP SP3, using the same login as Administrator
  3. It creates a new session with the same username and the application starts autorun which make duplicity in application

I just hoping i can enforce the Remote Desktop client to connect into only one session (console session), toying with Group Policy setting, successfully enforce the one session, but whenever i close remote desktop (disconnect) the console got disconnected too (which I didn't want it to behave like that).

I also try some setting to limit connection, still it doesn't behave as I want it too. Simple i just want to use 1 session, but each time we close remote desktop the session still alive, much like when we use VNC solution (RealVNC, UltraVNC, TinyVNC etc.)

Any solution(s)?


If you don't mind my asking what is the application? You could do as Kevin suggested and use mstsc /console OR mstsc /admin depending on your service pack level to connect directly to console. Another option is turning it into a service. I'm not sure if you have it running in a console window because you want to be able to see some output, which would negate this - but there are several apps that will package any app as a service. Another option is to remote desktop over to that machine using another account, then take over the administrator session.

  • the application just our custom made application for our company purpose
    – Dels
    Dec 16 '09 at 4:53

Have you tried using the /console switch with mstsc? This should force it to connect to the console session.


A couple of things:

  1. I've never had any problem connecting to the console session, disconnecting, and reconnecting to the console session by using mstsc /console. In fact I have separate RDP shortcuts set up for connecting to the console session and for connecting to a normal session.

  2. Even though you disconnect from the console session, the user remains logged in and any programs running in that session continue to run, so what's the problem with disconnecting? Why do you want it to not behave like that, as you say?

  • 1. sure i do too... 2. yes they are i just want it to not create a new session when we use normal session, but instead connect to console session, like what vnc solutions did, each new session (with same user account) = autorun called?
    – Dels
    Dec 16 '09 at 4:56

You can run a PowerShell script to see if the process is already running, and if not, run it.

$myProcessName = "wordpad"

$myProgram = "C:\\Program Files (x86)\\Windows NT\\Accessories\\wordpad.exe"

if (get-process $myProcessName -ea SilentlyContinue) {} else {[diagnostics.process]::start($myProgram)}

Substitute the correct values for $myProcessName and $myProgram with your program's info. The process name is typically the same as the file name, without the .exe, but check Task Manager to be sure. Save that to a file, scriptName.PS1, and run that when you logon. This could be in the Start Menu > Startup folder, or numerous other locations that you prefer. You need to enable running PowerShell scripts if you have not already done that, or you will get an error.

One note - to see all the running processes on the server, you need administrator permissions, which the user account you are using seems to have.


Have you tried changing the Terminal Session Service settings?

  1. Run [tscc.msc] in command line
  2. [Server Settings] > [Restrict each user to one session] > Yes


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.