Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to keep a log with the attempted log-in to a machine. The OS is Windows Embbeded Standard. Is it possible to make Windows execute an application or a script after every login attempt to enable me to save that information in my database?

share|improve this question
up vote 4 down vote accepted

You can go to Control Panel > Administrative Tools > Local Security Policy.

From there you want Local Policies > Audit Policy.

Here, you can set auditing to all types of events. I believe the one you want is "Audit logon events", Set it to Failure (or Success as well if you want).

All events will now get sent to Event Viewer.

There is no easy way to run a script on failure due to the fact that the user never loged on, however it will put an entry in to the Event Viewer under Security.

You could write a program, or a script that runs as system and checks the log every x seconds to do what you want on a failure - but I do not think it is easy.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .