Login attempts, and System logs

Varghjärta

Freshman
Joined
Aug 28, 2004
Messages
27
Hi!.

Does anyone know how one would go about monitoring or fetching info in some system log about login attempts that has failed. The application would be running, where upon the user would "lock" Windows. And I need to be able to keep track of login attempts. For instance if someone were to try and log on to my computer i'd later be able to see the time and such for the event.

Is this possible somehow?

EDIT: On Windows XP systems.
 
If auditing is enabled on the PC in question (can be setup through Administrative Tools -> Local Security Settings -> Local Policies -> Audit Policy) then this information will be logged into the standard Security Event Log.

This information can then be accessed through code via the EventLog class
C#:
System.Diagnostics.EventLog evt = new System.Diagnostics.EventLog();
evt.Log="Security";
foreach(System.Diagnostics.EventLogEntry entry in evt.Entries)
	{
	//do stuff with entry here
	}
 
Thank you! :)

This application thing I need is ment for a friend, yes truly; a friend. Whom I just now got to install .net 2 runtime.

The problem I forsee at the moment though might be that it is not enabled in her XP. And she is using XP Home and appearently MS have hidden alot of things.

Not even running: "%SystemRoot%\system32\secpol.msc /s" directly works.

Any programatic way of enabling it?

Thanks in advance!
 
Back
Top