Copy event log to access



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

.



Relevant Pages

  • Re: Windows/Macro Language Info?
    ... The point is that malware is often using Windows _features_. ... I totally understand the difference between client and server side (and you ... subverted by script code (the facilities to change file size, dates, etc. ...
    (comp.lang.cobol)
  • RE: login Scripts not running
    ... The scripts were set in "Computer Cnfiguration" of GPO, ... To ensure the "Startup Script" can run normally through GPO, ... first try to run it locally on the client side to check if it works. ... is key point of that Windows 2000 clients cannot apply the startup script ...
    (microsoft.public.win2000.active_directory)
  • Re: Permission denied only when 2 computers are used
    ... situation as all the client are either Windows 2000 or better; ... both computers need WMI installed. ... >> When I run this script using 1 remote computer name, ...
    (microsoft.public.scripting.vbscript)
  • Re: Get Windows User Name
    ... For some time now I have been looking for some client side script to ... My asp.net application is running across three domains, so windows ... set shell = createobject ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Microsoft Warns of New Windows Flaw (March 19, 2003 )
    ... In WINDOWS SETUP in ADD/REMOVE PROGRAMS of Control Panel ... Uninstall Outlook Express, ... Java, Javascript, ActiveX and all the other script runner toys Billy ... Install WebWasher the spammers are terrified of free from ...
    (comp.security.misc)

Loading