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
..
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
..
Comment