Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 28th, 2007, 01:25 PM
Registered User
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Selecting Event Logs in VBScript

I am trying to use VBScript & WMI to read the Security Event Log for specific Event ID's and a date range... the following Select statement works properly using the Logfile= 'Security' and Date range, but ignores the Event ID's.

strSQL = "Select * from Win32_NTLogEvent Where Logfile = 'Security' And EventCode = 529 Or Envent Code = 530 And TimeWritten >= '" & dtmStartDate & "' and TimeWritten < '" & dtmEndDate & "'"

Does anyone have any ideas?

Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting Event Logs brennanc SQL Server ASP 1 March 29th, 2007 01:09 AM
About Web logs anshul Pro PHP 1 January 5th, 2007 04:54 AM
Oracle Logs echovue Oracle 1 December 22nd, 2004 10:12 AM
Transaction Logs kilika SQL Server 2000 17 September 30th, 2004 09:26 AM
record logs rajanikrishna Pro VB 6 0 April 2nd, 2004 03:37 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.