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.