Re: WMI Date works on XP but not 2000 Server
From: nbullock (niel_bullock_at_hotmail.com)
Date: 04/21/05
- Next message: atx: "remote downlevel document"
- Previous message: Diana Smith [MSFT]: "RE: RSOP error with SP1"
- In reply to: Torgeir Bakken \(MVP\): "Re: WMI Date works on XP but not 2000 Server"
- Next in thread: Torgeir Bakken \(MVP\): "Re: WMI Date works on XP but not 2000 Server"
- Reply: Torgeir Bakken \(MVP\): "Re: WMI Date works on XP but not 2000 Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 21 Apr 2005 15:28:28 -0500
That works very well - Increased my table, allowing for the 21
InsertionStrings fields - Is there document that show the lables for these
fields?
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:OuZpW%23pRFHA.3496@TK2MSFTNGP12.phx.gbl...
> nbullock wrote:
>
>> Actually I tried following and it seems to be working - my table is now
>> getting populated. I had trouble identify the array eleiments, but it
>> looks like there are 5. I did notice that the contents change based on
>> the log file? I am filtering for Sercurity - So I will re-name the
>> fields after I am more sure about that.
>>
>> Now to tackle that date code
>>
>> Do you see any problems with this:
>>
>>
>> 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
>>
>> 'these fields will be renamed when there values are clear
>> objRS("InsertionStrings0") = ObjEvent.InsertionStrings(0)
>> objRS("InsertionStrings1") = ObjEvent.InsertionStrings(1)
>> objRS("InsertionStrings2") = ObjEvent.InsertionStrings(2)
>> objRS("InsertionStrings3") = ObjEvent.InsertionStrings(3)
>> objRS("InsertionStrings4") = ObjEvent.InsertionStrings(4)
>> objRS("InsertionStrings5") = ObjEvent.InsertionStrings(5)
>>
>> objRS.Update
>> Next
> Hi
>
> I have 21 array elemnt in some of the security log events.
>
> If possible, use a dynamic version instead:
>
> For i = 0 To UBound(ObjEvent.InsertionStrings)
> objRS("InsertionStrings" & i) = ObjEvent.InsertionStrings(i)
> Next
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
- Next message: atx: "remote downlevel document"
- Previous message: Diana Smith [MSFT]: "RE: RSOP error with SP1"
- In reply to: Torgeir Bakken \(MVP\): "Re: WMI Date works on XP but not 2000 Server"
- Next in thread: Torgeir Bakken \(MVP\): "Re: WMI Date works on XP but not 2000 Server"
- Reply: Torgeir Bakken \(MVP\): "Re: WMI Date works on XP but not 2000 Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]