13

XP, Vista or Windows 7:

Is there a command to use the "switch user" feature, the same way there is one to lock the workstation?

2 Answers 2

18

Is there a command to use the "switch user" feature,

You can connect to an existing session with tscon.


What I'd like to do is get to the "welcome screen",

Use tsdiscon.

If Fast User Switching is on, then simply locking the workstation* should display the Welcome Screen too.

* I hope you don't use rundll32 LockWorkStation.

6
  • Sorry about the delay. TSDISCON suits my purpose.
    – user34049
    Aug 10, 2010 at 15:21
  • 4
    Then choose that as answer :)
    – kokbira
    May 10, 2011 at 19:56
  • I'd like to emphasize that this works when not using RDP, even if the documentation doesn't give hints in that direction.
    – Bowi
    Mar 8, 2018 at 16:12
  • tscon works even via RDP, only tsdiscon won't return you to the login screen. Jul 25, 2018 at 16:31
  • 1
    @Matthieu No. As far as I remember, the documentation of tsdiscon says use this to disconnect from a rdp session. So my comment is a hint to anyone else who 1) reads this answer 2) reads tsdiscon documentation and 3) says Hey, this answer is wrong, tsdiscon can only be used when using RDP!.
    – Bowi
    Oct 28, 2019 at 14:05
3

I believe it is possible, this article from Lifehacker explains how:

runas /user:*computer name\*account name explorer.exe
8
  • 1
    Thanks, but this only opens an Explorer window under the context of another user. I've used it many times. What I'd like to do is get to the "welcome screen", or even downright open a session under the other user's ID, with a single command (which I'd put in a shorcut in the quick-load toolbar).
    – user34049
    Apr 13, 2010 at 15:31
  • 2
    *computer name\* is unneccessary. Apr 13, 2010 at 15:41
  • "computername" is necessary to access another computer. about launching explorer, it is only 50% of the path...
    – kokbira
    May 10, 2011 at 19:56
  • 2
    @kokbira Then Sam152 should change his answer to stipulate that is it unnecessary unless you are trying to run an instance of explorer.exe in the context of another account existing on another PC, though I note that the OP didn't state he wanted to do this with an account from another PC, in fact he didn't request anything to do with another instance of explorer.exe.
    – user66001
    Mar 7, 2013 at 7:03
  • ok, but I'm talking about killing explorer before running it as another user. doing as @sam152 said will open only a new explorer window
    – kokbira
    Mar 22, 2013 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .