Query Win32_PrintJob causes spoolsv.exe to grow and brings down system?

Discussion in 'Windows XP WMI' started by F. C., Apr 14, 2006.

  1. F. C.

    F. C. Guest

    Is this causing spoolsv.exe to grow in memory? Any workaround?
    ==================
    SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA
    'Win32_PrintJob'
    ==================


    Finally narrow down to this -

    Why the follwing few lines of codes cause spoolsv.exe keep growing / eating
    memory? It checks Win32_PrintJob once every second and I guess that has
    something to do with spoolsv.exe. It keeps growing and eventually bring
    down
    my systems (WinServer 2003 and XP home in my case)

    How can I stop it from growing? Any best practice sample codes of doing
    this?

    Thanks

    ==========
    Imports System
    Imports System.Management
    .......

    Dim watcherPrintJob As ManagementEventWatcher
    Dim scope As New ManagementScope("root\CIMV2")
    Dim qryPrintJob As New WqlEventQuery("SELECT * FROM
    __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_PrintJob'")
    watcherPrintJob = New ManagementEventWatcher(scope, qryPrintJob)
    watcherPrintJob.Start()
    scope = Nothing
    qryPrintJob = Nothing
    watcherPrintJob.Dispose()
    ===================
     
    F. C., Apr 14, 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. Philip Nunn [MSFT]

    Re: Lsass.exe and error 1073741819

    Philip Nunn [MSFT], Sep 20, 2004, in forum: Windows XP WMI
    Replies:
    0
    Views:
    11,441
    Philip Nunn [MSFT]
    Sep 20, 2004
  2. F. C.
    Replies:
    0
    Views:
    929
    F. C.
    Apr 15, 2006
  3. Guest
    Replies:
    4
    Views:
    1,161
    batman
    Apr 6, 2008
  4. gianni
    Replies:
    10
    Views:
    2,331
    Guest
    Nov 18, 2007
  5. the dude

    USB Devices causes Reboot

    the dude, Dec 21, 2007, in forum: Windows XP WMI
    Replies:
    0
    Views:
    580
    the dude
    Dec 21, 2007
  6. Nikko
    Replies:
    0
    Views:
    2,467
    Nikko
    May 15, 2008
  7. Karla1000

    Internet shuts down and goes to desktop

    Karla1000, Mar 1, 2009, in forum: Windows XP WMI
    Replies:
    1
    Views:
    772
    moose
    Aug 14, 2009
  8. English Bob

    XP won't upload and shuts down my PC

    English Bob, Nov 27, 2009, in forum: Windows XP WMI
    Replies:
    0
    Views:
    635
    English Bob
    Nov 27, 2009
Loading...