running wmi query fails on certain computers.

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi guys,

I wonder, you see the two queries below. The one that queries both
application and system logs (the one on the bottom) does not work on
certain computers - Windows 2000 Advanced Server - Windows 2000
domain). The same query works on other apparently similar computers.

If I run the query (the one on the top) that only queries the
application log it works ok.

The problem is that it does not produce any errors, it simply doesn't
fire any events.

The queries are always ran using domain admin credentials.

I would appreciate some help on this !
Thanks and Regards.

'OK
strWQL = "SELECT * FROM __InstanceCreationEvent WITHIN 15 WHERE
TargetInstance ISA 'Win32_NTLogEvent'" & _
"AND TargetInstance.Type = 'Error' AND TargetInstance.LogFile =
'Application'"

'NOT OK
strWQL = "SELECT * FROM __InstanceCreationEvent WITHIN 15 WHERE
TargetInstance ISA 'Win32_NTLogEvent'" & _
"AND TargetInstance.Type = 'Error' AND TargetInstance.LogFile =
'Application' OR targetinstance.logfile='system'"

Set objEventSource = objWMIService.ExecNotificationQuery(strWQL)

.



Relevant Pages

  • RE: top X Percent
    ... Write another like it that returns the bottom 10 % ... Then write a query that joins those two queries and it will return the ... tractors and the Bottom 10 % revenue tractors for Each location) ... I did a MakeTable query to get the 10% number of tractors for each ...
    (microsoft.public.access.modulesdaovba)
  • Re: updateable query
    ... You should see it at the bottom of your table, query, and form. ... Some types of queries are not editable, ... FROM (EmpMilestones INNER JOIN Employee ON EmpMilestones.EmployeeAlias = ...
    (microsoft.public.access.forms)
  • RE: Dynamically referencing a recordset?
    ... through that recordset to set the query parameters in VBA. ... to be the one who had to modify 1440 queries if there is a change in the ... different table schema, then you need 3, one for each record type. ... This is a database that tracks the production on records in another ...
    (microsoft.public.access.modulesdaovba)
  • Re: Was: what does "serialization" mean?
    ... > the specific queries up front. ... that the NEXT time the query is run the query is fast, ... data base, don't know squat" when in fact the Donald clone doesn't ... >> WHATEVER would probably be a separate query to summarize total sales. ...
    (comp.programming)
  • Re: Official Status of SQLServer 2005 ADP
    ... I have said that the support for SQL passthrough ... queries under MDB was bad and worst than the one offered by ADP while you ... > attempt to "pass through" every Access query against a linked ODBC ...
    (microsoft.public.access.adp.sqlserver)