none
RDP disconnect and NOT lock session?

    Question

  • How can I disconnect and RDP session and NOT lock the console. This is a dedicated HTPC. I want to avoid using VNC if I can but I cannot find a way using MTSC or TSCON to do this.

    thanks
    Thursday, October 29, 2009 5:04 AM

Answers

  • I figured it out.

    Very sad that the guys working for MSFT we totally useless to help (as they usually are on this forum)

    Connect to console session...

         mstsc.exe /v:htpc /admin


    Disconnect WITHOUT locking session and redirect the screen back to the connected monitor...


       tscon 1 /dest:console


    - this changed from tscon 0 /dest:console back with XP. They changed the 0 to a 1 (thanks for documenting MSFT!)
    • Marked as answer by Livin Tuesday, November 03, 2009 1:59 AM
    Tuesday, November 03, 2009 1:59 AM

All replies

  • I think you need to run a server version of Windows to have concurrent users logged on, including from a remote desktop.
    Then when you log on remotely, it does not lock out other users.
    Thursday, October 29, 2009 11:48 AM
  • Here you go:
    http://thegreenbutton.com/forums/p/79427/393664.aspx#393664

    HTH,
    Chris
    [If this post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of this message. By marking a post as Answered, or Helpful you help others find the answer faster.]
    Thursday, October 29, 2009 12:01 PM
  • I don't want to have 'concurrent users' - I want 1 user... I want it to autologin (which it does at boot) and then when I need to remote in, I want to connect to the console. When I'm done, I want to disconnect without locking.

    Just like I can with VNC.

    Is there no way to do this without enabling concurrent hack?
    Thursday, October 29, 2009 4:47 PM
  • The problem is that you can't have the same user logged on twice - even with the concurrent-sessions hack, you need to have a second account (for remote-admin use.) 
    If you were to implement the concurrent-sessions hack, but only use one account, you'd still lock the console session as soon as you logged on.
    With a second account, the local user will remain logged on, even after you disconnect the remote session.

    -Chris
    [If this post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of this message. By marking a post as Answered, or Helpful you help others find the answer faster.]
    Thursday, October 29, 2009 9:54 PM
  • in XP there was a way using TSCON to disconnect and redirect the console without locking the login.

    It is VERY SAD that Win7 broke sooo many things that worked perfectly in XP.

    • Marked as answer by Livin Tuesday, November 03, 2009 1:59 AM
    • Unmarked as answer by Livin Tuesday, November 03, 2009 1:59 AM
    Friday, October 30, 2009 12:42 AM
  • I figured it out.

    Very sad that the guys working for MSFT we totally useless to help (as they usually are on this forum)

    Connect to console session...

         mstsc.exe /v:htpc /admin


    Disconnect WITHOUT locking session and redirect the screen back to the connected monitor...


       tscon 1 /dest:console


    - this changed from tscon 0 /dest:console back with XP. They changed the 0 to a 1 (thanks for documenting MSFT!)
    • Marked as answer by Livin Tuesday, November 03, 2009 1:59 AM
    Tuesday, November 03, 2009 1:59 AM
  • Works like a charm.... Tested on XP/7

    Any way you connect is fine but have to run below code on target machine to disconnect
    For XP: tscon 0 /dest:console
    For 7 : tscon 1 /dest:console

    No compromise to security

    The mentioned command leaves the remote computer unlocked, which can reduce the system security. You can lock the computer after the test execution is over using the following command:

    Rundll32.exe user32.dll, LockWorkStation


    Tuesday, October 09, 2012 7:21 AM
  • To: Prabhat Kumar

    Thanks, but I would like to know can we force put this action (tscon...) when disconnect the RDP. I have a computer which can do that, but I don't know how to make it. Any idea for this?

    Thank you.

    Friday, January 11, 2013 4:28 AM
  • Hi Qho,

    i search also a solution how to force the "tscon" call when rdp is closed. How did you solved this point?


    • Edited by Nokinger Monday, May 27, 2013 12:41 PM
    Monday, May 27, 2013 12:41 PM
  • Hi Nokinger,

    No, but I mentioned the computer that was returned to normal when it is restarted. So, I am also finding the solution for solved it.

    Thursday, June 13, 2013 1:56 AM
  • To: Prabhat Kumar

    Thanks, but I would like to know can we force put this action (tscon...) when disconnect the RDP. I have a computer which can do that, but I don't know how to make it. Any idea for this?

    Thank you.

    Old thread, I know. But I had forgotten tscon and needed it for a (laughably) some digital signage... If it's me, I'd just create a batch file on the machine you're RDP-ing to using Livin's solution. This way, your command line session exits after execution and it's only a double-click away. Now, since it's an HTPC you're using that (I'm presuming) is single-headed (one monitor), you'll probably want to throw your media interface back up when you're done doing whatever.

    Unfortunately, I haven't found a solution for a program that's already running, but this will open an executable and maximize it:

    START /MAX [path to executeable]

    So, your final "code" for your batch file, if you're using Windows Media Center, would read something like this:

    START /MAX %windir%\ehome\ehshell.exe
    tscon 1 /dest:console
    exit

    The 'exit' is not necessary in my experience, but I usually add it anyway.

    22 hours 10 minutes ago