Re: Creating Permanent Mof in Windows 2000
From: Sarika Sharma[MSFT] (sarikas_at_online.microsoft.com)
Date: 03/19/04
- Next message: Maximus: "inheriting permission"
- Previous message: Sarika Sharma[MSFT]: "Re: Invalid parameters?"
- In reply to: Harry S: "Creating Permanent Mof in Windows 2000"
- Next in thread: Venus Millo: "Re: Creating Permanent Mof in Windows 2000"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 10:52:52 -0800
The EventNamespace = "root\\default";
should specify where the events originate in this case it should be
root\cimv2
-- Sarika Sharma [MSFT] WMI Test Engineer This posting is provided "As Is" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm Please do not send e-mail directly to this alias. This alias is for newsgroup purposes only. "Harry S" <anonymous@discussions.microsoft.com> wrote in message news:A0D17A61-D2AE-432C-A0D7-61F69E9E6871@microsoft.com... > 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: Maximus: "inheriting permission"
- Previous message: Sarika Sharma[MSFT]: "Re: Invalid parameters?"
- In reply to: Harry S: "Creating Permanent Mof in Windows 2000"
- Next in thread: Venus Millo: "Re: Creating Permanent Mof in Windows 2000"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|