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?
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.