Hi
i have written a vbscript to manage permanent event consumer classes of wmi ..
here i used the NTEventLogEventConsumer class to store the specific event notification in the windows event log...heres my script.... -
strComputer = "."
-
Set objWMIServices = GetObject("winMgmts:" _
-
& "{impersonationLevel=impersonate}!\\" & _
-
strComputer & "\root\subscription")
-
Set objEventFilterClass = objWMIServices.Get("__EventFilter")
-
Set objEventFilter = objEventFilterClass.SpawnInstance_()
-
objEventFilter.Name = "ProcessTrace"
-
objEventFilter.QueryLanguage = "WQL"
-
objEventFilter.Query ="SELECT * from __InstanceOperationEvent WHERE TargetInstance ISA 'Win32_ProcessTrace'"
-
objEventFilter.EventNamespace="root\cimv2"
-
objEventFilter.CreatorSID=Array(1,1,0,0,0,0,0,5,18 ,0,0,0)
-
objEventFilter.Put_()
-
Set objConsumerClass =objWMIServices.Get("NTEventLogEventConsumer")
-
Set objConsumer=objConsumerClass.SpawnInstance_()
-
objConsumer.Name="CONNTProcesstrace"
-
objConsumer.Category=0
-
objConsumer.SourceName="WinMgmts"
-
objConsumer.EventType=1
-
objConsumer.NumberOfInsertionStrings=2
-
objConsumer.CreatorSID=Array(1,1,0,0,0,0,0,5,18,0, 0,0)
-
objConsumer.InsertionStringTemplates=Array("%TargetInstance.Name%","%TargetInstance.ProcessId%")
-
objConsumer.Put_()
-
Set objBindingClass=objWMIServices.Get("__FilterToConsumerBinding")
-
Set objBindingInstance=objBindingClass.SpawnInstance_( )
-
objBindingInstance.Consumer="CONNTProcesstrace"
-
objBindingInstance.Filter="ProcessTrace"
-
objBindingInstance.CreatorSID=Array(1,1,0,0,0,0,0, 5,18,0,0,0)
-
objBindingInstance.Put_()
-
now the script doesnt show any syntax error or runtime error....
but in the wbem log file it generates a message...
(Thu Feb 15 08:47:55 2007.711296) : Event subsystem was unable to perform the necessary operations to accomodate a change to the system state.
The state of the database may not reflect the state of the event subsystem (8004103A)
the error code "8004103A" refers to invalid object path...
but i cant figure it...which object path it reffering....
pls help me out of this...
0 1272 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Pavils Jurjans |
last post by:
Hallo,
I have been programming for restricted environments where Internet Explorer
is a standard, so I haven't stumbled upon this problem until now, when I
need to write a DOM-compatible code.
...
|
by: James Fortune |
last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't
understand why people who know how to write code to completely replace
a front end do not write something that will automate...
|
by: xtra |
last post by:
Hi Folk
I have about 1000 procedures in my project. Many, many of them are along
the lines of
function myfuntion () as boolean
on error goto er
'-
Dim Dbs as dao.database
Dim Rst as...
|
by: Tim Geiges |
last post by:
Since I am being challenged with learning c# I figured I could pass
some of the pain on to you guys :-)
I have another question(this one is important for me to fix before I
can get my app to Beta)...
|
by: hillcountry74 |
last post by:
Hi,
I'm a newbie and trying to understand event handling in c#. I have
understood handling events using delelgate objects. But not this
method- "Event handling by overriding the virtual...
|
by: Ashok Kumar K |
last post by:
Hi all,
Where can I get some insight on using the __hook, __unhook, event_source and
event_receiver for specifically COM events. The documentation given in MSDN
is very minimal. I have the...
|
by: Kenneth P. Graci |
last post by:
ok all you smart people and low level gurus
how do i detect the close of a combbox's drop down list?
there must be a way and i'm to dumb to figure it out.
|
by: mflll |
last post by:
I am looking into the different techniques of handling arrays of edit
boxes in
Java Script. The first program below works fine. However, are there
better ways of
doing this, where the person...
|
by: Peter Michaux |
last post by:
Hi,
Today I have been testing the event models from Netscape 4.8 and IE 4
to the current crop of browsers. I'd like to write a small event
library similar in purpose to the Yahoo! UI event...
|
by: ciffycyclops |
last post by:
Hi
i have written a vbscript to manage permanent event consumer classes of wmi ..
here i used the NTEventLogEventConsumer class to store the specific event notification in the windows event...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |