Apple Fast User Switching.

I know milleons of you jerks have been pestering each other about

this "Fast User Switching" thing in OSX. :rant: Well, I've figured out

a way to do it. :) I need you to help though. You need to come up

with a way to tell windows to "switch user" from the command prompt.

#187863

Im pretty sure this is impossible to switch users via the command prompt, windows just doesnt work like this.

The best thing I thought of would make an effect just to go to the login screen, but thats just pointless.

#187867

Originally posted by ifido@Jul 9 2004, 03:16 PM

I know milleons of you jerks have been pestering each other about

this "Fast User Switching" thing in OSX. :rant:

<{POST_SNAPBACK}>

Is that really necessary? You really need to learn to use the rant smilie less often... <_<

#187876

I dont think he really meant he was angry ;) but it was a little unnecessary

#187883

The better way to swith user is by terminal in linux !!! if you want do terminal shell !! like bash

{JOKE BEGIN}

#login : root

passwd : ******

#Root > ls ~

Images Docs Other App.Readme

#Root > rm -r ~/*.*

« D'OH ! »

#Root > exit

#login : MySister

passwd : ******

#MySister > echo "It my fault" >> ToParents.note

#MySister > Halt

{JOKE FINISH}

#187897

Or you could have just used "su", the "switch user" command. ;)

#187901

SW ? That doesn't work under windows does it ?

#187904

Maybe I have an idea :

When two users are connected, if you are an admin, you can open the task manager and directly connect to the other user (with a right click on his name, then connect)

So maybe you can trace the task manager and see which API is called when switching user directly... Hope you have a good disassembler ! :)

Or maybe just ask Microsoft, could work... :D

#187915

Windows XP has fast user switching built in.

When there is more than one local account, press window key + L and choose switch user.

This leaves the current user logged in with there programs running while you login as another user.

This is nothing new and has ALWAYS been part of XP.

You just have to turn it on.

Little check box that says "Enable fast user switching"

#187918

Or you could have just used "su", the "switch user" command

I feel very stupid... SU, for years, I always thought that it means "SuperUser" to log in root

Thanks for the information... i will use it from now to " switch user "

#187922

QUOTE :

Maybe I have an idea :

When two users are connected, if you are an admin, you can open the task manager and directly connect to the other user (with a right click on his name, then connect)

So maybe you can trace the task manager and see which API is called when switching user directly... Hope you have a good disassembler !

Or maybe just ask Microsoft, could work...

-------------------------------------------------------------------

EXACTLY ! :D That was what I was thinking of only I'm not smart

enough to do it. Can you ? :) Thanks alot :)

#187944

surely this would mean logging into two accounts before switching users though? that seems really redundant :P

#187945

Awwww DAMN ! :rant: :cry:

#187965

I don't know if this is possible but.

Perhaps if you made your own login screen replacement as well totally replacing XP's which has the transition as part of the program. Then you would turn off the service for the built in one which would give you the win2k style login and then you can use this as a front end for it except for the part where you hit win + L it would bring up the win2k style login before using the transition.

So when you boot up it brings up your OSX style login screen then when you are logged in win + L would bring up the win2k switch user\login screen or your own win2k style login screen which is a part of your program (which might be the way you'd have to do it) which you would have to capture the login event to perform a transition on it. Like taking a screenshot of the current screen and your service which would always stay open would apply it on a cube along with the bg of the next desktop because windows don't even load the taskbar as a service But if it already had been logged it would use saved screenshots of each desktop that you would have to take when they are transitioned from and use that. If you log out it brings up the OSX style login screen . Which is pretty much how it works on OSX (in function not implementation).

To make a menu I would think that you would need to make it so an external program can communicate with your login screen service and ask it for who is logged in and their user icons.

Someone HAS made a flash login screen replacement before. I just don't know about the rest.

#187974

Originally posted by ifido@Jul 9 2004, 06:16 PM

I know milleons of you jerks have been pestering each other about

this "Fast User Switching" thing in OSX. :rant: Well, I've figured out

a way to do it. :) I need you to help though. You need to come up

with a way to tell windows to "switch user" from the command prompt.

<{POST_SNAPBACK}>

iFido, if it would be a simple matter of command line it would be done a thousand times already!

I'm not trying to look like cool leet programmer, but if you're going to develop serious things (and FUS is such one), you'd better obtain the MS Platform SDK - using that thing you can do everithing that can be done in Windows.

In your case I'd advice to look through the Authorization, Networking and Authentification sections of MSDN, and also find the documents on replacing the GINA dll. If you are enough power to do it and to make FUS - then make it faster, I'm already working on it.

#187988

I scanned through the docs and here's what the Win32 API provides:

"Fast user switching is built on top of windows terminal services."

Given that, the following code does the same as Win + L:

#include "stdafx.h"
#include <wtsapi32.h>
int main(int argc, char* argv[])
{
 HANDLE hSrv = WTS_CURRENT_SERVER_HANDLE;
 DWORD dwCount = 0L;
 WTS_SESSION_INFO *pSi = NULL;
 if( WTSEnumerateSessions(
   hSrv,
   0L,
   1L,
   &pSi,
   &dwCount))
 {
   for( DWORD i=0; i < dwCount; i++ )
     if( WTSActive == pSi[i].State )
     {
       WTSDisconnectSession(hSrv, pSi[i].SessionId, TRUE);
       break;
     }
   WTSFreeMemory(pSi);
 }
return 0;

After that, you could call good ole LogonUser().

However I have found no documentation on where the images are,

(perhaps hidden somewhere in the registry)

if someone points me in the right direction, I'd mock up a command line

app for iFido as requested...

PS: There is no 'su' or 'switch user' command line app in Windows -

unless you count the NT server command that only starts a process with the

credentials of some other user. If I'm not misinformed, thats the same

behaviour in Unix/Linux, su meaning superuser ...

hth,

herd

#187990

Originally posted by ifido@Jul 9 2004, 06:16 PM

I know milleons of you jerks have been pestering each other about

this "Fast User Switching" thing in OSX. :rant: Well, I've figured out

a way to do it. :) I need you to help though. You need to come up

with a way to tell windows to "switch user" from the command prompt.

<{POST_SNAPBACK}>

iFido, if it would be a simple matter of command line it would be done a thousand times already!

I'm not trying to look like cool leet programmer, but if you're going to develop serious things (and FUS is such one), you'd better obtain the MS Platform SDK - using that thing you can do everithing that can be done in Windows.

In your case I'd advice to look through the Authorization, Networking and Authentification sections of MSDN, and also find the documents on replacing the GINA dll. If you are enough power to do it and to make FUS - then make it faster, I'm already working on it.

#187992

@ herd : That's a good win32 programmer ! Surely better than me :)

The perfect thing would be a WTSConnectSession, wonder if it exists... Should, the Task Manager must use something like this, because the login screen isn't displayed !

Microsoft has made it, we should manage it too ! :D

And I'll try the disassembler way...when I'll have some time :)

#187997

I simulated the 3D animation of Fast User Switching in Flash, if it could be of help to anyone :P

#188618

Oh YES !!! Gimme gimme gimme ! :D With this It could be perfect !

Thank you so much Ken :D YOu rule :D

#188637

well i found this utility that basically enables fast user switching under xp, it seems to work so hopefully one of u tallented devs can put its methods to good use ;) .

-The Unknown

#192620

Originally posted by RIMMER@Jul 9 2004, 10:01 PM

iFido, if it would be a simple matter of command line it would be done a thousand times already!

I'm not trying to look like cool leet programmer, but if you're going to develop serious things (and FUS is such one), you'd better obtain the MS Platform SDK - using that thing you can do everithing that can be done in Windows.

In your case I'd advice to look through the Authorization, Networking and Authentification sections of MSDN, and also find the documents on replacing the GINA dll. If you are enough power to do it and to make FUS - then make it faster, I'm already working on it.

<{POST_SNAPBACK}>

I agree with that , i dont want to insult you (i dont have any other word for say what i want but it's not exactly what i mean) n but we can't do everything in bat , bat is very limited , try to learn C++ or other languages

#193029