Re: programmatically log on / logg off user
- From: Eric Perlin [MSFT] <EricPerlinMSFT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Mar 2007 16:00:05 -0800
1 & 2 will work with the console session too.
You may be able to get away with not writing a GINA if you license a special
dll that was meant for biometrics on XP. It's mentioned in the following
article about fast user switching.
http://msdn2.microsoft.com/en-us/library/ms997634.aspx
You can e-mail fusqa _at_ microsoft.com for more information.
On Vista, a credential provider is the only option.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Eric Perlin [MSFT]
"Stephan Steiner" wrote:
Eric.
Thanks for the information.
How would 1) and 2) translate to a user logged in via the local system
console?
As far as my number 3 goes, while security isn't a concern (those are
virtual machines and only admins can connect to the local console via
management software), autologon would be problematic if I find if the user
is already logged in via TS (so when you get to the console all you have to
do is enter your password and you're in again) and in that case I wouldn't
like to log in again. And since login via TS requires a password, I'll
always get to the login screen when connecting to the console again. Is
there any useful way of just sending the password to the login screen? I
figure writing my own GINA provider would not only be time consuming, but
also very complex as I'd like to retain the standard logon functionality
(via console and terminal services) but just like to have a way to
programmatically log on a user on the console.
Regards
Stephan
"Eric Perlin [MSFT]" <EricPerlinMSFT@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:5DAA1588-78D0-4326-9246-56D4BC156F38@xxxxxxxxxxxxxxxx
1/ Use WTSEnumerateSessions to get the list of existing TS sessions.
You can query more info about the user logged on in that session
afterwards
using WTSQuerySessionInformation
2/ Use WTSLogoffSession to target a specific session.
Never ever use ExitWindows(Ex) from a service.
3/ That part could be trickier. If security is not a concern, you could
setup autologon before step 2. Otherwise, I'm afraid you'll have to
develop a
small credential provider (if the target OS is Vista), or some form of
GINA
for previous OSes.
I hope it will be obvious for the user that was logged off that another
user
is now logged on...
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Eric Perlin [MSFT]
- Prev by Date: Re: Restricting access to an exe
- Next by Date: Re: PLAP provider
- Previous by thread: Inconsistant results for FindFirstFile/FindNextFile on Vista
- Next by thread: Re: PLAP provider
- Index(es):
Relevant Pages
|