ExecutionEngineException with WMI

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pat magee

    #1

    ExecutionEngineException with WMI

    have written an app to query a heterogenous network of
    Win98/WinME/XP/Win2000 machines. I can connect to WMI
    using the WMI CIM Studio but I get an
    ExecutionEngine Exception whenever I try to connect to a
    Win98 box from C# code. The following snippet works fine
    when run on Win2000/XP clients, but throws the
    ExecutionEngine Exception from Win9x boxes:

    ManagementObjec tSearcher query;
    ManagementObjec tCollection qColl;
    ManagementScope ms = new ManagementScope
    ("\\\\<machinen ame>\\root\\cim v2");
    ObjectQuery oq;

    oq = new ObjectQuery("SE LECT * FROM Win32_ComputerS ystem");

    try{
    query = new ManagementObjec tSearcher(ms, oq);
    }
    catch(Exception e)
    {
    // whatever
    }

    I have tried all different combinations of impersonation
    and authority levels but nothing seems to work. According
    to the .NET docs it should never throw these exceptions
    anyway, so whats up? any ideas?

    I'm using VS.NET with version 1.4 of the .NET framwork. OS
    is Win2k, clients running Win98 4.10 2222A
    ..


  • Horatiu Ripa

    #2
    Re: ExecutionEngine Exception with WMI

    Facing the same problem.

    --
    Horatiu Ripa
    Software Development Manager
    Business Logic Systems LTD
    21 Victor Babes str., 1st floor, 3400 Cluj-Napoca, Romania
    Phone/Fax: +40 264 590703
    Web: www.businesslogic.co.uk

    This email (email message and any attachments) is strictly confidential,
    possibly privileged and is intended solely for the person or organization to
    whom it is addressed. If you are not the intended recipient, you must not
    copy, distribute or take any action in reliance on it. If you have received
    this email in error, please inform the sender immediately before deleting
    it. Business Logic Systems Ltd accepts no responsibility for any advice,
    opinion, conclusion or other information contained in this email or arising
    from its disclosure.

    "pat magee" <pat@thaipaintb all.com> wrote in message
    news:0a5901c37d ac$70a67570$a30 1280a@phx.gbl.. .[color=blue]
    > have written an app to query a heterogenous network of
    > Win98/WinME/XP/Win2000 machines. I can connect to WMI
    > using the WMI CIM Studio but I get an
    > ExecutionEngine Exception whenever I try to connect to a
    > Win98 box from C# code. The following snippet works fine
    > when run on Win2000/XP clients, but throws the
    > ExecutionEngine Exception from Win9x boxes:
    >
    > ManagementObjec tSearcher query;
    > ManagementObjec tCollection qColl;
    > ManagementScope ms = new ManagementScope
    > ("\\\\<machinen ame>\\root\\cim v2");
    > ObjectQuery oq;
    >
    > oq = new ObjectQuery("SE LECT * FROM Win32_ComputerS ystem");
    >
    > try{
    > query = new ManagementObjec tSearcher(ms, oq);
    > }
    > catch(Exception e)
    > {
    > // whatever
    > }
    >
    > I have tried all different combinations of impersonation
    > and authority levels but nothing seems to work. According
    > to the .NET docs it should never throw these exceptions
    > anyway, so whats up? any ideas?
    >
    > I'm using VS.NET with version 1.4 of the .NET framwork. OS
    > is Win2k, clients running Win98 4.10 2222A
    > .
    >
    >[/color]


    Comment

    • Willy Denoyette [MVP]

      #3
      Re: ExecutionEngine Exception with WMI

      Are you sure WMI is installed and DCOM enabled on these Win9X boxes?

      Willy.

      "pat magee" <pat@thaipaintb all.com> wrote in message news:0a5901c37d ac$70a67570$a30 1280a@phx.gbl.. .[color=blue]
      > have written an app to query a heterogenous network of
      > Win98/WinME/XP/Win2000 machines. I can connect to WMI
      > using the WMI CIM Studio but I get an
      > ExecutionEngine Exception whenever I try to connect to a
      > Win98 box from C# code. The following snippet works fine
      > when run on Win2000/XP clients, but throws the
      > ExecutionEngine Exception from Win9x boxes:
      >
      > ManagementObjec tSearcher query;
      > ManagementObjec tCollection qColl;
      > ManagementScope ms = new ManagementScope
      > ("\\\\<machinen ame>\\root\\cim v2");
      > ObjectQuery oq;
      >
      > oq = new ObjectQuery("SE LECT * FROM Win32_ComputerS ystem");
      >
      > try{
      > query = new ManagementObjec tSearcher(ms, oq);
      > }
      > catch(Exception e)
      > {
      > // whatever
      > }
      >
      > I have tried all different combinations of impersonation
      > and authority levels but nothing seems to work. According
      > to the .NET docs it should never throw these exceptions
      > anyway, so whats up? any ideas?
      >
      > I'm using VS.NET with version 1.4 of the .NET framwork. OS
      > is Win2k, clients running Win98 4.10 2222A
      > .
      >
      >[/color]


      Comment

      Working...