Stay logged in while RDP session is over

14,629

I found a solution and it is really simple as expected. There is a command which disconnects you from remote session and reconnects that session to the remote computer's console. In human language: it closes your RDP session and "route" it to the console of the logged user so the user stays "connected" and there's no need to manually fill the password again. For the info., in RDP settings there is no option for this behaviour. At least not in gpedit.msc.

The "mojo" command:

tscon [SessionID] /dest:console

SessionID can be obtained with this command:

qwinsta

And some links:

Share:
14,629

Related videos on Youtube

Srneczek
Author by

Srneczek

Updated on September 18, 2022

Comments

  • Srneczek
    Srneczek over 1 year

    I wasn't able to find answer to my question. Is it possible to use RDP protocol (I am using Windows 8.1) and once I finish with remote control and disconnect from session, last logged user would stay logged in or he would log in automaticly?

    I am using teamviewer to remotly controll my PC, even from my bed, but it transfers image data, which makes it slow and in many cases unusable for me (it also has other disadvantages for me but it's not important for my question). I tryed application with RDP protocol on my tablet which works just fine, only bad thing is, that once I disconnect from the session, pc which is beeing controlled is stucked on user login screen, therefore it is unusable for me.

    Any ideas?

    • Logman
      Logman about 10 years
      not sure of question but "logging off" is not the same as "disconnecting" from a rdp session. Please clarify question. If you disconnect you can logon into the same session. Also, you can only have one session active at one time with Win7/8. So logging on with different use accounts will auto logoff.
    • Knuckle-Dragger
      Knuckle-Dragger about 10 years
      try dameware, it runs as a service allowing you access without logging into the OS. You will see the same screen on the desktop, while dameware-ing in from the tablet. If you are logged in when you disconnect the tablet, you will stay logged in on the desktop.
    • Srneczek
      Srneczek about 10 years
      @Logman Edited the answer. By "log off", I ment disconnecting from session as described in use case scenario in second paragraph. See edited answer.
    • MaQleod
      MaQleod about 10 years
      what sorts of things do you need to do when you log on and then when you log off the screen session and remain connected? I ask because looking into setting up an SSH server on the desktop may serve your needs.
    • Srneczek
      Srneczek about 10 years
      @MaQleod for example turn some media player on, play video, disconnect and keep that video playing.
  • Zitrax
    Zitrax almost 9 years
    Don't understand the downvotes either, I had the exact same problem and your answer solved it. Thanks.
  • Vesnog
    Vesnog almost 6 years
    @Zitrax I am trying this solution for a virtual Windows Server 2012 and it seems that I am getting something wrong as my GUI application does not work properly. Are there any tricks or subtle points?