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!
The command I was looking for is:
which ends the current rdesktop session and reset the user as logged in! Found after days of research (and hours after posting here...)
If the tscon command doesn't work for you...
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...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...
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