Remote Desktop Session Locks Workstation after Exit
I do a lot of remote desktop sessions within my house. I constantly remote from my netbook to my PC to work remotely and it seems I’m always poking around within the two Media Center PC’s in the house as well.
One thing I’ve always disliked is when I jump into my Media Center via remote desktop (RDP) and then exit the screen locks back to a password screen. Yes, I could always do away with the password but I like the fact that I can log into it via RDP when I’m away from the house. I then have a need to keep a keyboard handy to enter the password. That’s not high on the wife acceptance factor in the living room.
I did some searching around and found a solution to this little conundrum and I wanted to share it with you. The solution was found at thegreenbutton.com and also at arsetechnica.com.
All you have to do is run a simple command that will log you off and return the system to it’s console. Here is the command:
%windir%\System32\tscon.exe RDP-Tcp#0 /dest:console
Create a shortcut on the desktop called End RDP and use this command as the target. Change the icon to something pretty and your done.
A couple of things to remember. If you find it not working, check the user session that you are using on the RDP. Open Task Manager and check the users tab. See the session tab at the right? That number, in this case it’s 0, corresponds to the number in the command. RDP-Tcp#0
The last thing to remember is in Windows 7 you will have to run it as an administrator. You will be prompted by User Account Control as well. Right Click the icon on the desktop and Run as Administrator and you will be booted from the RDP session and it will return to it’s normal desktop. All the programs running will still be there when you check it next.
I hope that helps someone else as much as I appreciate it.
Share
Category: Windows Home Server




I'm pretty sure that Live Mesh doesn't have that limitation. Then again, I have all Home Premium, so no RDP for me.
OMG Thank you so much for sharing this! I've been wanting to do this forever. It's pretty much the only reason I have LogMeIn installed instead of using RDP exclusively.
Oh and to avoid the session issue you mentioned, I use: Start > Run > mstsc /admin
Thanks for that tip vyper. I'll use that. I prefer RDP in the house so I don't have to jump into mesh to get it done. Although mesh is handy when you are away. Also, RDP, I can use the audio, copy paste between workstations. Very nice to have that option. It's a shame that you can only do it(legally) with Ultimate.
Nice tip Dave, didn't know that! I agree and prefer RDP vs Live Mesh on the internal LAN because of those features you mentioned.
Another way to check and clear RDP connections is with the qwinsta and rwinsta command line tools. I wrote a short bit about how to use those commands on my blog at http://anotherlab.rajapet.net/2008/04/how-to-iden…
It is possible to hack the windows 7 home premium to support being a remote desktop server (rather than just a client), details at
http://www.tenniswood.co.uk/technology/windows-me…
there is an issue with the home premium hack as there's no tscon.exe in home premium by standard, so this console trick doesn't work
I also have very strong ethical/moral reasons against that hack. When a company does price differentiation of products with specific features, hacking in those features in a cheaper product to be equivalent to the more expensive one's is wrong. Since the only real differentiator between home premium and professional/ultimate is the remote desktop, I just don't feel at all right about using features that you very intentionally didn't pay for.
That's just me though. My wife say's I'm a legalistic prude.
[...] Home Server Show. [...]
usa… the main difference as far as i can tell is bitlocker. rdc is rather trivial. anyways, did anyone get the big that after you disconnect your mouse pointer does not disappear once you are in media center.
I copyed the 2 tscon files from an ultimate pc to a rdp hacked home premium pc and the tscon command now works!
After reading this in Februrary, I finally got the time to implement it. It works great and helps me tremendously. Not only for the obvious reason, but the fact is that I “sling” my Media Center Interface around the house to various TVs w/o PCs connected. Without this tip, after RDP I had to run downstairs, unlock the Media Center PC and then go to the TV that I actually wanted to watch at the time.
thank you VERY much for this! I too, have a not-so-handy keyboard for my HTPC in my living room. Having to punch the apssword after every Remote Session was a pain.
Awesome! Thank you very much. This solved my only issue with RDP to my HTPC.
Ok i think i must be doing something wrong, this didnt work for me. i have RDP'd into the machine and placed this into a short cut and ran it as an admin. A CMD window flashes open and then closed and nothing happens
Never mind!! the local user that you RDP's into also needed to be an administrator ( I was just authenticating UAC with a domain admin account when it prompted) so the actuall user itself that you are on needs to be an admin also. For the reasons im doing this the account didnt need to be an admin so yea.
cheers works great!