Skip to content

Using remote desktop without having to login after disconnecting

I am always using remote desktop to connect to various machines around the house as well as virtual machines and it always annoys me that when I disconnect from the console.  I came across a solution today that leaves the console logged in!!  All you need to do is disconnect using the following command:

tscon.exe 0 /dest:console

In my case I created a batch file with this single line in it and replicated it to all the machines in the house, and added a shortcut to it from each Start Menu.  Now when I need to disconnect I just click the shortcut, works like a charm.  It’s especially useful on my Tablet as I don’t have the keyboard attached.

It works like this:

You were locally logged into the host at some point and are STILL logged in
there – but are no longer actually in front of the PC – but at a remote
location. You start a
remote desktop connection to the host and log in as
the same user – essentially continuing the session you were logged in
locally when you were physically at the host. To end your session, instead
of disconnecting you run the command line: “tscon 0 /dest:console”, which
essentially pushes the current session back to the console – or makes it
look like you never interrupted the local session. Thus when you get back
to the host, it is like you never left that original session.

7 Comments

  1. Anonymous wrote:

    Hi Steve, thanks a lot for posting this solution!
    It works fine and does what i need.

    Tuesday, October 17, 2006 at 7:53 AM | Permalink
  2. Anonymous wrote:

    brilliant! been looking for something like this for ages. Sweet and simple :)

    Saturday, October 28, 2006 at 9:24 AM | Permalink
  3. Anonymous wrote:

    Absolutely Brilliant!

    Was going nuts until I found this simple solution!

    Tuesday, April 24, 2007 at 1:16 AM | Permalink
  4. Anonmous wrote:

    Thank you, thank you, thank you! This is just what I was looking for. It was really hard to find this information. Exactly what I needed for home use.

    Monday, April 21, 2008 at 10:52 AM | Permalink
  5. brad wrote:

    Hi there. This works great. Thanks, I’ve been looking for a solution to this issue. But, I’m having one problem. When I execute the command, it leaves my “host” computer unlocked. Anyone else have this problem?

    Thanks,
    Brad

    Wednesday, July 23, 2008 at 3:46 PM | Permalink
  6. Tuan Pham Anh wrote:

    Awesome. Thank you very much!

    Saturday, August 9, 2008 at 11:04 PM | Permalink
  7. TC wrote:

    Thank you!!!! Brilliant, exactly what i’m searching.

    Wednesday, May 6, 2009 at 10:37 AM | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*