C #: Log in to Windows7

This may seem like a strange idea, so bear with me.

Every day (Mon-Fri) I wake up, go to work and go to my computer. I was wondering if it is possible to pull the details of each login to the system (mostly I'm interested in the date and exact time). Then, with this information, I can build it on a chart, and some interesting templates can come out. For example, I noticed that on Mondays I usually start working earlier than on any other day of the week :) (yes, I know, rest on weekends can be a reason).

In any case, if someone knows a way to pull logs on a specific computer and read them in a C # application (WPF, Console, etc.), it would be great. What would be a big event if there was some C # library that could facilitate the process.

Any ideas / suggestions are welcome.

Best wishes,

Monthy

+4
source share
2 answers

You need to get it from the Windows event log http://msdn.microsoft.com/en-us/library/k6b9a7h8.aspx then filter the logon / logoff event.

In any case, I think that there is a recording program that starts every time you enter the system (autostart) and registers the time when you enter the system and exit the system.

For statistical purpose you can try RescueTime

+3
source

You can try to pull data from the event log .

The .NET Framework offers classes for accessing the event log programmatically. Start with an MSDN article in the EventLog class.

+2
source

All Articles