O
Orbian
Hello,
I am having trouble getting the MAC addresses on some machines using
the Management class. The code below works on most machines, but on
some I get an "Access Denied" exception when performing a
GetInstances() call on some machines. Any ideas on what might be
causing this? Is there any other way to get the MAC adresses?
System.Management.ManagementClass mc;
mc = new
System.Management.ManagementClass("Win32_NetworkAdapterConfiguration");
System.Management.ManagementObjectCollection moc;
moc = mc.GetInstances(); // Throws "Access Denied" exception.
I am having trouble getting the MAC addresses on some machines using
the Management class. The code below works on most machines, but on
some I get an "Access Denied" exception when performing a
GetInstances() call on some machines. Any ideas on what might be
causing this? Is there any other way to get the MAC adresses?
System.Management.ManagementClass mc;
mc = new
System.Management.ManagementClass("Win32_NetworkAdapterConfiguration");
System.Management.ManagementObjectCollection moc;
moc = mc.GetInstances(); // Throws "Access Denied" exception.