RE: How can I get the logon script to be executed while having a custo
- From: Cedric Scheyder <cedric.scheyder@xxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Dec 2005 01:51:04 -0800
Hi Bernard,
I'm working on a replacement of msgina dll.
I have also a lot of trouble to set environment vars like
APPDATA,LOGONSERVER, HOMEDRIVE etc..
I finally find how to set one :
In WlxLoggedOutSas, you must create a WLX_PROFILE_V2_0 structure and fill the
pszEnvironment with "LOGONSERVER=yourserver" (in unicode)
When i started with my gina i found that APPDATA, SESSIONNAME and
LOGONSERVER are visible in a command prompt.
Today, i miss HOMEDRIVE,HOMEPATH, CLIENTNAME and HOMESHARE. Don't know how
to set them.
Any Idea ?
"Bernard Bastien" wrote:
> Hello all!
>
> I am looking for any help about the question on the subject line. I could
> have restricted my message to simply ask that question, but here are some
> details for context.
>
> I am working on a biometric SSO solution that offers the option to
> interactively logon to Windows using biometric input. Naturally, this
> requires the replacement of GINA by our own customized version, which must
> be a full-featured replacement, not a hook or a stub over the MSGINA
> component.
>
> Things are running quite well with our "home-made" component, except for one
> thing: I can't have the login script to be executed when a user logs in
> using our GINA. This login script is set by the system administrator at the
> domain level, and is a VBS-based script, and it is well done when returning
> to plain MSGINA configuration.
>
> It seems that the USERINIT.EXE program should have done it but is unable to
> do so. The "pszMprLogonScript" argument to the "WlxActivateUserShell" is
> empty, even if calls to "LsaLogonUser" or "NetUserGetInfo" are giving me the
> name of the script to be executed. Is the fact that Winlogon can't give me
> that info is related to the same situation than UserInit not starting the
> script?
>
> I have searched throughout the web for days and got very little info about
> that. I know that I am not alone who encountered that problem but answers
> have not made their way up to the web and newsgroups. A similar thread in
> this group here, six years ago, got me some parts of the answer. Richard
> Ward, I think he worked on Winloon, made a reply that stated that:
>
> "the GINA returns the profile information, including where to load the
> profile from, in the return from WlxLoggedOuSAS. In between that return and
> the call to WlxActivateUserShell, winlogon will do all the grunt work." and
> "The GINA is responsible for setting the LOGON_SERVER environment variable,
> and any other variables specific to the logon, this too can be sent up to
> winlogon in the profile structure."
>
> Using this knowledge, I started a brand new project using the source code
> published by Keith Brown in a pair of articles in MSDN magazine of last
> spring ("Customizing GINA"). When compiled as is, that GINA replacement
> has the same problem of not running the logon scripts. Then I tried to add
> data to the "ppWinLogonProfile" output structure in the "LoggedOutSAS"
> method, using info from the LsaLogonUser, and even hardcoded stuff, just to
> make it work, but never succeded. I even tried to push a hardcoded
> environment table, like this:
>
> ((WLX_PROFILE_V2_0*)*ppWinLogonProfile)->pszEnvironment =
> _localAllocString(L"LOGON_SERVER=\\\\SRV6\0\0");
>
> But the environment variable disappeared when looking at the environment
> table in a logged-on session.
>
> What I have understood from the messages and docs I have read, I think I can
> rely on Winlogon to load the user profile, and on UserInit to run the login
> script, without programming myself the loading of user profile in
> LoggedOutSAS (which seems to be quite tricky) or the execution of scripts in
> WlxActivateUserShell. But there is a trick that I did not catch.
>
> So, to summarize it, using the "fullgina" sample code from the MSDN article,
> what is missing to make it run the login scripts like when using MSGINA?
>
> Thank you for any help,
>
> Bernard
>
>
>
.
- Prev by Date: Re: Problem with getting object name
- Next by Date: Re: Problem with getting object name
- Previous by thread: RE: How can I get the logon script to be executed while having a custo
- Next by thread: Multiple Heaps problem
- Index(es):
Relevant Pages
|