WQL Problem

Discussion in 'Windows XP WMI' started by screamingveg, Feb 21, 2006.

  1. screamingveg

    screamingveg

    Joined:
    Feb 21, 2006
    Likes Received:
    0
    I'm trying to write a script that will grab the event logs from a remote computer for a specific day. I've got everything set up just how I want it, except the following line doesn't work:

    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NTLogEvent WHERE TimeGenerated LIKE " & dayt & " %",,48)

    When I try to use colItems for anything I get an error: 0x80041017

    dayt is an 8 character string that looks like this: 20060131
    It gets set to today's date when the script is run.

    If anyone has any idea why this isn't working, or can offer me any help at all it would be most appreciated.
     
    screamingveg, Feb 21, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Aaron

    WQL & Parameters

    Aaron, Jan 19, 2005, in forum: Windows XP WMI
    Replies:
    3
    Views:
    3,217
    Torgeir Bakken \(MVP\)
    Jan 20, 2005
  2. rs

    Help with WQL query

    rs, Mar 4, 2005, in forum: Windows XP WMI
    Replies:
    1
    Views:
    7,956
    Peter Falz
    Mar 4, 2005
  3. sedyn

    Deep WQL Query

    sedyn, Aug 26, 2005, in forum: Windows XP WMI
    Replies:
    0
    Views:
    1,095
    sedyn
    Aug 26, 2005
  4. Koti
    Replies:
    1
    Views:
    3,096
    andrew
    Sep 8, 2005
  5. Koti
    Replies:
    4
    Views:
    19,201
    sunitnair
    Sep 10, 2005
  6. Guest
    Replies:
    0
    Views:
    998
    Guest
    Jun 29, 2006
  7. Phil Sharpe

    WQL question

    Phil Sharpe, Aug 7, 2007, in forum: Windows XP WMI
    Replies:
    0
    Views:
    514
    Phil Sharpe
    Aug 7, 2007
  8. Alejandro martinez

    WQL - kill process

    Alejandro martinez, Apr 22, 2009, in forum: Windows XP WMI
    Replies:
    2
    Views:
    1,405
    Alex K. Angelopoulos
    May 8, 2009
Loading...