WIN32 - get the GUID of a Network Device

Tim Golden mail at timgolden.me.uk
Mon Apr 26 06:47:03 EDT 2010


On 26/04/2010 09:49, Richard Lamboj wrote:
> thanks for your response. No, i don't mean the MAC Address. I mean the GUID ->
> Sample: {1E2428C1-9F2C-48D7-AB53-3229DFB7E217}
>
> I want to change TcpAckFrequency and TcpDelTicks of a Network Interface. I Try
> to change it over the Registry, but maybe there is another way?

OK; I'm going to hope that Tim Roberts or someone equally knowledgeable can
kick in here as devices really isn't my area. However this looks like it *might*
be doing what you want:

<code>
import wmi

for nic in c.Win32_NetworkAdapter (MACAddress=i.MACAddress):
   for pnp in c.Win32_PNPEntity (DeviceID=nic.PNPDeviceID):
     print pnp.Caption, "=>", pnp.ClassGuid

</code>

TJG



More information about the Python-list mailing list