Capturing login event in Service Application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am writing a Windows Service Application and want to be able to capture when the user is logging into Windows. Is there any way within .NET to do this? Basically, I need the equivalent to the SystemEvents.SessionEnded event.
 
Dan S said:
I am writing a Windows Service Application and want to be able to capture
when the user is logging into Windows. Is there any way within .NET to do
this? Basically, I need the equivalent to the SystemEvents.SessionEnded
event.

A quick and dirty way to do that would be to detect when the process
explorer.exe starts. This is straitforward to do and allow you to detect
when a user logs in. However, if you are using a system that allow several
users to be logged in at the same time (eg Windows XP with FUS enabled),
you'll only detect the first user with that method (but there may be some
way around this problem).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top