wmi temporary consumer question (Win32_NtLogEvent Class)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: barabba (barabba72_at_hotmail.com)
Date: 05/14/04


Date: 14 May 2004 09:53:51 -0700

Hi all,

I have a question concerning this temporary wmi consumer which listens
to the event viewer for new entries. I'm building (at least I'm trying
to) a management appliction and I'm putting all the pieces together.
However, see script below.

My problem is this: Once the event is delivered, I need to bind to it
in order to be able to extract some other properties (date, time,
source, category, message, description, etc. etc and have it sent or
displayed) of the event being delivered.
I have done something similar with processes, for example, but I can't
seem able to do the same with win32_NtLogEvent class.

Anybody has a tip on how to do this ? Of course echoing the value of
"colMonitoredEvents.NextEvent" raises an error.... (I thought I could
use this as a starting point to bind to the event...)

Thanks to all,
Bar

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate, (Security)}!\\"& _
 strComputer & "\root\cimv2")
Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
("Select * from __instancecreationevent where " _
 & "TargetInstance isa 'Win32_NTLogEvent' ")
Do
Set objLatestEvent = colMonitoredEvents.NextEvent
strAlertToSend = "the event was raised"
wscript.echo colMonitoredEvents.NextEvent
Loop



Relevant Pages

  • Re: OpenDNS.com howto
    ... The opendns service is a free service where you can use ... their dns entries, to filter web-contents. ... is this possible to block/redirect domains with bind ... BSE = Mad Cow Desease ... ...
    (comp.protocols.dns.bind)
  • Re: IP MASQ wont work
    ... Check wether they match with the entries ... > run ipconfig /all in a command prompt, the DNS server is listed as ... You can configure the DNS addresses somewhere in the network ... > BIND or something? ...
    (comp.os.linux.networking)
  • Re: Focus out problem
    ... the entries when the user entered the values in that entries. ... First case:By pressing Enter: Here i used bind to bind the task ... Enter to entry. ... Second case:By pressing Tab: Here also i used bind. ...
    (comp.lang.perl.tk)
  • Focus out problem
    ... the entries when the user entered the values in that entries. ... First case:By pressing Enter: Here i used bind to bind the task ... Enter to entry. ... Second case:By pressing Tab: Here also i used bind. ...
    (comp.lang.perl.tk)
  • "Unable to Bind" error and Listen-Only List
    ... I can't use port 80 for my default web site and am getting ... the following error in Event viewer: ... Unable to bind to the underlying transport for 0.0.0.0:80. ...
    (microsoft.public.inetserver.iis)