Sign in to follow this  
Followers 0
Javik

Creating detailed event logs for all login commands?

1 post in this topic

I find Windows login scripts to be extremely annoying because they don't output anything to the computer's event logs regarding success or failure of commands.

If something goes wrong with a command in a login script there is generally no error reporting, and there may not even be any messages displayed to the end-user, other than a quick blur of text scrolling before the login window closes and the desktop loads.

Capturing the multi-line standard output and error output of commands with environment variables is an exercise in frustration, as is trying to send a multi-line output from a batch file into EVENTCREATE.

Is there an AutoIT script available that can do something like this?

LOGEVENT -Options <Windows command>

-> Sends output of both StdOut and StdError to the Application event log

-> (no options) .. Just send output and tag event as Information, ID = 1

Options:

-id n ........ use this ID for Information events

-warneq n ..... If output errorlevel = n then tag event with Warning

-warngt n ..... If output errorlevel > n then tag event with Warning

-warnlt n ..... If output errorlevel < n then tag event with Warning

-warnnot n .... If output errorlevel <> n then tag event with Warning

-warnid i ..... Use this ID for warnings

-erroreq n .... If output errorlevel = n then tag event with Error

-errorgt n .... If output errorlevel > n then tag event with Error

-errorlt n .... If output errorlevel < n then tag event with Error

-errornot n ... If output errorlevel <> n then tag event with Error

-errorid i .... Use this ID for errors

More severe event tags override less severe tags if used together.

Example usage:

LOGEVENT -warngt 0 -errorgt 1 -id 100 -warnid 101 -errorid 102 mkdir "%TEMP%\foo"

I pretty much expect that nothing like this currently exists, and I'm going to have to make an event logging utility for this myself.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0