Performing tasks on user login/logout



I want to perform some tasks on users login and logout. What is the
best way to do this?

I've looked at trying to put my "script" in the registry, and know how
to do this for login (Run entries), but can't figure out how to do it
for logout. So I've been thinking of writing a program to monitor for
login/logout and run the tasks that way instead.

I looked at the Task Scheduler, but it can only generate events on
login, not logout.
I looked at WMI, but I seem to only find login/logout info in the MSFT
class, and it's noted as being defined but not implemented.
I could write a GINA module, but that seems like overkill, and then I
have to figure out how to be a pass thru for the GINA so that the
system is as unmodified as possible. I really only want to monitor for
login/logout and run something on behalf of the user.
I looked at the Shell, and various event notification methods but
nothing seems to do this tasks.

I also did a google search and came across the following:
http://www.codeproject.com/system/winlogon_notification_package.asp?df=100&forumid=1802&exp=0&select=1732221

It uses the WinLogon Notification Package, and seems to do something
like what I want. My question is - (a) is it really what I want? (b)
is this the proper method for doing so?

I know how to do the rest of the program set once I figure that out,
and really just want some kind of notification from Windows on when a
user logs in and out, and which user it is that is doing so.

On Unix/Linux this is easy as the various shells (bash, etc.) have
config files that are specifically used during login (e.g. bashrc/
bash_profile) and logout (e.g. bash_logout). What is the proper way to
do this in Window?

Thanks,

Ben

.



Relevant Pages

  • Re: OWA does not logout for IE 6.0 - Security Issue
    ... Configure the /exchange directory to use basic authentication and it will ... I have read the posts about the problems with OWA and the login prompt ... But now I need to login as a different user, so I click the Logout ... will leave behind a pre-logged in Exchange account. ...
    (microsoft.public.exchange.setup)
  • Referencing variable in calling class?
    ... I assume because the cookie destruction is being sent down in that page ... when that page renders it still appears as if the user is logged ... So, I thought perhaps as part of my logout routine, I could set a variable ... whether or not it displays the 'login' url or the 'logout' url. ...
    (php.general)
  • Re: =?iso-8859-15?Q?Doch_noch_mal_ne_grunds=E4tzliche_Frage_?= =?iso-8859-15?Q?dazu?
    ... Es funktioniert in beiden Fällen - beim ersten login. ... logout abmelde, und danach wieder eine neue Verbindung herstellen will, ... Port 10000, login, und sofortigem Logout ist erst mal Feierabend. ... drueckt, dann beim Login-Prompt aber keinen Usernamen eingibt, ...
    (de.comp.os.vms)
  • Re: Unique identify a user-session
    ... > login-time and the logout time to a file. ... Because a user could login at ... > At login and logout of a user we run a small programm which writes the> login-time and the logout time to a file. ... > Does windows assign every logged-in user something like a unique ID> which could be used? ...
    (microsoft.public.windows.server.general)
  • Re: Apple change their notification policy?
    ... ship in 2-4 days, and the applecare package is supposed to ship ... Also, when I login and go to track orders, it does NOT show the ... just sort of strange that I never got any notification ...
    (comp.sys.mac.advocacy)