4

I need to connect via remote desktop to a Windows XP machine (logging out the current user), do some stuff, and then log out the remote desktop session and having a user X who logs in (from the front-end I mean).

I'll try to be clearer:

I have some Windows XP machines which offer some interactive information in public places. I need to remote dekstop them to do some assistance, and then I'd like to log out and have the main user (the one who offers the service) logged back. I know there's a command for the windows prompt to achieve this, but cannot find it out!

Humberto Castellon
  • 849
  • 1
  • 7
  • 17
carlesso
  • 213
  • 2
  • 8

3 Answers3

5

The command I was looking for is:

tscon 0 /dest:console

which ends the current rdesktop session and reset the user as logged in! Found after days of research (and hours after posting here...)

carlesso
  • 213
  • 2
  • 8
1

If the tscon command doesn't work for you...

tscon 0 /dest:console

Run: qwinsta and check what user you're logged in as... Might be ID 1 or ID 2... Figure out the right ID number, and just use that...

tscon 1 /dest:console
tscon 2 /dest:console

Works really great... There's a discussion of it on SuperUser

https://superuser.com/questions/355935/how-can-i-restore-a-remote-desktop-session-to-the-local-console

I tried to add this as a "comment" but my status level isn't high enough...

erwin
  • 170
  • 7
0

If you are actually assisting the user, you can offer what is referred to as Unsolicited Remote Assistance, and send them an RA request. This way it does not log off the user who is logged on at the console.

Here is the link to run on your computer when you offer assistance:

hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/unsolicited/unsolicitedrcui.htm

You also need to change a group policy setting on the target computer:

Administrative Templates\System\Remote Assistance\Offer Remote Assistance Setting: Enabled, Allow users to remote control

Greg Askew
  • 34,339
  • 3
  • 52
  • 81
  • Actually is not what I'm looking for... The fact is that I'm connected from a linux box via rdesktop, and need the command to write in command prompt that logs out me and log back an user. – carlesso Apr 21 '10 at 12:02