"Dan S" <Da**@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
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).