P
pat magee
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
ExecutionEngineException 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
ExecutionEngineException from Win9x boxes:
ManagementObjectSearcher query;
ManagementObjectCollection qColl;
ManagementScope ms = new ManagementScope
("\\\\<machinename>\\root\\cimv2");
ObjectQuery oq;
oq = new ObjectQuery("SELECT * FROM Win32_ComputerSystem");
try{
query = new ManagementObjectSearcher(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
ExecutionEngineException 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
ExecutionEngineException from Win9x boxes:
ManagementObjectSearcher query;
ManagementObjectCollection qColl;
ManagementScope ms = new ManagementScope
("\\\\<machinename>\\root\\cimv2");
ObjectQuery oq;
oq = new ObjectQuery("SELECT * FROM Win32_ComputerSystem");
try{
query = new ManagementObjectSearcher(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
..