lapucca
asked on
How can I read the property's "Description" of a security Log's entry in the Evnet Viewer?
I'm using vs2005 C#, .net 2.0 on Windows 2000 server.
When I double click on an entry of the "Security" log in the system's "Event Viewer", a Property window pops up. In this window, there is a "Description" section that lists many different information like "User Name:, "Domain", "Login ID"......
How can I obtain each of this inforation in my program? Thank you.
When I double click on an entry of the "Security" log in the system's "Event Viewer", a Property window pops up. In this window, there is a "Description" section that lists many different information like "User Name:, "Domain", "Login ID"......
How can I obtain each of this inforation in my program? Thank you.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is a quick overview of his vbscript:
Enter the path to the security log you wish to read
Calls the ReadSecLog Function and It reads the entire log and stores it in sParsedSecLog
Enter the path of the output file for the parsed security log
Calls the WriteToFile Function which writes the parsed security log to your output file specified
Enter the path to the security log you wish to read
Calls the ReadSecLog Function and It reads the entire log and stores it in sParsedSecLog
Enter the path of the output file for the parsed security log
Calls the WriteToFile Function which writes the parsed security log to your output file specified
ASKER
I need to get the description filed and parse it so that exe won't work. Thanks.
WMI is the way to go, do you require more specific links or instructions on accessing WMI via C, .Net?
-rich
-rich
ASKER
Thanks everyone. In C# I can retreive an entrylog's message, which I had to parse to get each of the key item.
ASKER
Your link downloads a vbscript program. I don't know hot to read that. Thanks.