Asked by:
GINA + How to run domain scripts after logon

Question
-
How to run domain scripts after logon ?
I need working example in C.Monday, March 8, 2010 1:46 PM
All replies
-
Why is this related to C? Isn't this configureable in Windows?
DaveTuesday, March 9, 2010 3:19 PM -
Hello
I think that you can call the C library function "system" to invoke your script file from GINA
http://msdn.microsoft.com/en-us/library/b4b6wz4t.aspx
Please let me know whether this is useful to you.
Regards,
Jialiang Ge
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Monday, March 15, 2010 6:10 AM -
I want run domain scripts. If my computer is in some windows domain and admin define script it must be run.
Thursday, March 18, 2010 12:43 PM -
Hello
If you would like to assign logon script to computers in your domain, you can configure GPO
http://technet.microsoft.com/en-us/library/cc179134.aspx
(see the To assign computer startup scripts section)
However, I do not understand how this is related to GINA. Could you please elaborate on this?
Regards,
Jialiang Ge
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Monday, March 22, 2010 3:52 AM -
When I run MS Gina module logon scripts are executed.
When I use my custom Gina scripts are not executed.
Any ideas ?
Monday, March 22, 2010 1:41 PM -
Hello
In your Gina module, you can write code to execute the logon scripts. (see my first reply). When you deploy the GINA module to your clients, deploy the logon scripts with it.
In your own custom GINA script, you do not call the above function to execute logon script.
Does this work for you?
Regards,
Jialiang Ge
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Tuesday, March 23, 2010 2:36 AM -
Hello
How are you? May I know the result of the suggestion?
Regards,
Jialiang Ge
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact msdnmg@microsoft.com.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Monday, March 29, 2010 1:49 PM -
When I run MS Gina module logon scripts are executed.
When I use my custom Gina scripts are not executed.
Any ideas ?
Logon scripts (both GPO and user) are actually handled by USERINIT.EXE. If I recall correctly, the user logon script is handled by the same instance of USERINIT.EXE that starts the desktop instance of EXPLORER.EXE (i.e. the one that would be spawned from gina!WlxActivateUserShell), whereas the domain GPO scripts are executed by separate instances of USERINIT.EXE which are requested to be spawned by WINLOGON.EXE via gina!WlxStartApplication.The easy way to screw up the execution of these login scripts (i.e. works fine with MSGINA so I know the configuration is right, but with my replacement GINA installed they no longer run) would be to miss including the expected environment variables that WINLOGON was trying to impart to the spawned instances of USERINIT.EXE, since its via environment variables that the intention for USERINIT.EXE to run a particular script is commuicated.
Be sure you're building an environment block that includes all the environment specified in the pEnvironment parameter to the Wlx functions cited. In the case of GPO scripts you're looking for an envrionment variable such as "UserInitGPOScriptType", and "UserInitMprLogonScript" is the environment varibale WlxActivateUserShell is expected to create with the pszMprLogonScript parameter string's contents.
-Alan
Sunday, July 11, 2010 3:20 AM