D
Fri Jun 18 05:19:22 CDT 2004
Sorry,
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")
Thanks,
Doug
"Roland Hall" <nobody@nowhere> wrote in message
news:ubrnUuQVEHA.2928@tk2msftngp13.phx.gbl...
> "D VanDerMark" <dvanderm@twcny.rr.com> wrote in message
> news:ewd8T6LVEHA.384@TK2MSFTNGP10.phx.gbl...
> : Here is a snippet from my code. It grabs all events that meet a certain
> : criteria
> : LogFile = 'Application'
> : EventCode = '11707'
> : This works fine. It grabs all the new software installations. I want
to
> : narrow this down to Office XP.
> : The Message I want to grab is 'Product: Microsoft Office XP
> Professional --
> : Installation operation completed successfully.'
> :
> : I tried to add this
> :
> : msgCheck = "Product: Microsoft Office XP Professional -- Installation
> : operation completed successfully."
> : <<< code >>>
> : if msgCheck = objEvent.Message then
> : <<< do something >>>
> :
> : It doesn't work.
> : I also tried "Select * from Win32_ntllogEvent where Message = msgCheck"
in
> : an ExecQuery
>
> What are you using to read the log file?
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library -
http://msdn.microsoft.com/library/default.asp
>
>