- i am querying for event viewer log using vbscript.
- When I try ot use OR operator @ Where Logfile=’System’ Or ‘Application’ it gives info but drops TYPE condition and i found my results with information type data.
- How do i combine this two queries so that I don’t have to write
extra code.
Set colLoggedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where Logfile = 'Application' AND Type <> 'Information' AND TimeGenerated > ' " & dteDate & "' ")
Set colLoggedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent Where Logfile = 'System' AND Type <> 'Information' AND TimeGenerated > ' " & dteDate & "' ")
regards : msinfo
You can use parentheses for an inner comparison.