Copy event log to access
- From: "Denis" <pasdemail@xxxxxxxxxxxxxxx>
- Date: Thu, 14 Jul 2005 05:19:04 -0700
I used Windows XP Pro SP2, P IV 3.2 Ghz, 1 Go ram.
I copied this script from the Microsoft web
site(http://www.microsoft.com/technet/scriptcenter/scripts/logs/eventlog/lgevvb03.mspx)
Set objConn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.Recordset")
objConn.Open "DSN=EventLogs;"
objRS.CursorLocation=3
objRS.Open "SELECT * FROM EventTable" , objConn, 3, 3
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colRetrievedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent")
For Each objEvent in colRetrievedEvents
objRS.AddNew
objRS("Category") = objEvent.Category
objRS("ComputerName") = objEvent.ComputerName
objRS("EventCode") = objEvent.EventCode
objRS("Message") = objEvent.Message
objRS("RecordNumber") = objEvent.RecordNumber
objRS("SourceName") = objEvent.SourceName
objRS("TimeWritten") = objEvent.TimeWritten
objRS("Type") = objEvent.Type
objRS("User") = objEvent.User
objRS.Update
Next
objRS.Close
objConn.Close
I created the database (Access 2000) and create the ODBC connection.
It works fine but if I have an event of type error, I receive an error
message:
Windows Script Host
Script: c:\.......\test.vbs
Ligne: 26
Charact: 5
Error: A stats E_FAIL was send....
Code: 80004005
Source: Microsoft Cursor Engine
In the event viewer security I receive 2 time the same error:
Type de l'événement : Audit des échecs
Source de l'événement : Security
Catégorie de l'événement : Utilisation d'un privilège
ID de l'événement : 578
Date : 14.07.2005
Heure : 14:06:39
Utilisateur : test\toto
Ordinateur : toto-XP
Description :
Opération sur objet privilégié :
Serveur objet : Eventlog
Handle d'objet : 0
Id. de processus : 716
Utilisateur principal : toto-XP$
Domaine principal : test
Id. de session principale : (0x0,0x3E7)
Utilisateur client : toto
Domaine client : test
Id. de la session cliente : (0x0,0x32886)
Privilèges : SeSecurityPrivilege
http://go.microsoft.com/fwlink/events.asp.
If someone can help me it will be great !
Denis
.
- Follow-Ups:
- RE: Copy event log to access
- From: Graham K
- RE: Copy event log to access
- Prev by Date: Re: Logon Script Doesn't work
- Next by Date: Re: Logon Script Doesn't work
- Previous by thread: Clear Domain Controller DNS cache
- Next by thread: RE: Copy event log to access
- Index(es):
Relevant Pages
|
Loading