Creating Permanent Mof in Windows 2000
From: Harry S (anonymous_at_discussions.microsoft.com)
Date: 03/19/04
- Next message: Stefan Goerres: "Re: VBScript quey all usb devices?"
- Previous message: Torgeir Bakken (MVP): "Re: Privelge Not Held - win32shutdown"
- Next in thread: Sarika Sharma[MSFT]: "Re: Creating Permanent Mof in Windows 2000"
- Reply: Sarika Sharma[MSFT]: "Re: Creating Permanent Mof in Windows 2000"
- Reply: Venus Millo: "Re: Creating Permanent Mof in Windows 2000"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 18 Mar 2004 17:01:10 -0800
In the article Monitoring and Responding to Events with Standard Consumers, it mentions that for Windows 2000 the event classes queried by __EventFilter and the consumer class must be in the same namespace. What does that really mean?
The ActiveScriptEventConsumer is in Root\Default.
The _EventFilter is in Root\CIMV2
When I compiled my sample.mof below, I got the following error: "(Thu Mar 18 16:48:53 2004) : Unable to activate event filter with invalid query 'select * from __InstanceDeletionEvent where (TargetInstance ISA "Win32_Process" AND TargetInstance.Name = "notepad.exe")' (error 80041002). The filter is not active"
Any hints or tips to solve this issue? Thanks.
Harry
-----------------------------------------------------------------------------------
' sample.mof
#pragma namespace ("\\\\.\\root\\default")
instance of ActiveScriptEventConsumer as $Cons
{
Name = "ASEC";
ScriptingEngine = "VBScript";
ScriptFileName = "c:\\asec2.vbs";
};
instance of __EventFilter as $Filt
{
Name = "EF";
Query = "SELECT * FROM __InstanceDeletionEvent WITHIN 5 "
"WHERE TargetInstance ISA \"Win32_Process\" "
"AND TargetInstance.Name = \"notepad.exe\"";
QueryLanguage = "WQL";
' EventNamespace = "root\\default";
};
instance of __FilterToConsumerBinding
{
Filter = $Filt;
Consumer = $Cons;
};
---------------------------------------------------------------
I
- Next message: Stefan Goerres: "Re: VBScript quey all usb devices?"
- Previous message: Torgeir Bakken (MVP): "Re: Privelge Not Held - win32shutdown"
- Next in thread: Sarika Sharma[MSFT]: "Re: Creating Permanent Mof in Windows 2000"
- Reply: Sarika Sharma[MSFT]: "Re: Creating Permanent Mof in Windows 2000"
- Reply: Venus Millo: "Re: Creating Permanent Mof in Windows 2000"
- Messages sorted by: [ date ] [ thread ]