Link to home
Create AccountLog in
Avatar of sharon669
sharon669

asked on

catch Lockdown & Idle on events on XP pro/home station

Hi all
I would like to catch the following XP pro/home events:
Enter and exit idle mode (peripherals don't get input for few minutes)
Station lockdown and entrance (winkey + L or alt+ctrl+del -> lock computer)

I would like to run script/ batch / application on these events.
Please advice,
Sharon
ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of sharon669
sharon669

ASKER

Thank you for this post cookre,
This method of identifying lockdown is a little bit problematic,
What if the "Windows Security" String is different on pro/home stations?

Say you can get "lock down' event by the lock window title,
How do you catch the "unlock event"?

Any how this logic will require constant checking/querying the system which will load the station.
Those are the titles for XP Pro.  I've never been in front of a Home box, so you'll have to verify them yourself.

1) If someone is logged on and active, window's station "WinSta0" / desktop "Winlogon" won't have any of those three windows.  

2) When they do CtrlAltDel, window "Windows Security" is created and they're presented with options.

3) If they select Lock Workstation, "Windows Security" goes away and window "Computer Locked" is created.

4) The next mouse or keyboard activity causes "Computer Locked" to go away, and "Unlock Computer" is created.


Since MSGINA.dll is also in Home, I presume these states obtain there also.

5) After entering their password, state 1) resumes.

 
Oops.

The line about GINA should have been at the end.
Thank you
With your solution I will have to run these test every few seconds, it will load my client's computer, ant want be accurate (depend on the sample rate).
I am looking for OS API solution, win32 method call, or Hook, so I can implement it later on XP home / 2000
Do the GetLastInputInfo() first.  That way, if they're typing or mousing, you don't have to do any of the other checks.
But I looking better win oriented solution,

So topic still open
If anyone have idea on how to achieve the station status functionality please advise;

Thank you for you time