Re: WIN32 - get the GUID of a Network Device

2010-04-27 Thread Tim Golden

On 26/04/2010 22:07, Tim Roberts wrote:

Tim Golden wrote:

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:


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



No, the PnP class GUID is the "Class" line from the top of the INF
file.  That will be the same for all network cards.

You can look up the network interface GUID in the registry, in
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards.  There's
one subkey for each interface, containing a Description and a
ServiceName.  The ServiceName is the interface GUID.



Thanks, Tim. I was sure you'd be in the know :)

TJG
--
http://mail.python.org/mailman/listinfo/python-list


Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Tim Roberts
Tim Golden wrote:
> 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:
>
> 
> 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
> 

No, the PnP class GUID is the "Class" line from the top of the INF
file.  That will be the same for all network cards.

You can look up the network interface GUID in the registry, in
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards.  There's
one subkey for each interface, containing a Description and a
ServiceName.  The ServiceName is the interface GUID.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Tim Golden

On 26/04/2010 11:47, Tim Golden wrote:

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:


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




[replying to self] Please ignore that: not only does the code not
work, due to some rough cut-and-pasting, it also doesn't produce
the GUID you wanted. Sorry. Hopefully someone else has a clue.

TJG
--
http://mail.python.org/mailman/listinfo/python-list


Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Tim Golden

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:


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



TJG
--
http://mail.python.org/mailman/listinfo/python-list


Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Richard Lamboj

Am Monday 26 April 2010 10:14:24 schrieb Tim Golden:
> On 26/04/2010 09:06, Richard Lamboj wrote:
> > is there a way to get the GUID from a Network Device?
>
> Are you talking about the MAC address? If so, here's
> one way:
>
> 
> import wmi
>
> for nic in wmi.WMI ().Win32_NetworkAdapterConfiguration ():
>print nic.caption, "=>", nic.MACAddress
>
> 
>
> If you're not, then which GUID are you referring to?
>
> TJG

Hello,

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?

Kind Regards,

Richi
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Tim Golden

On 26/04/2010 09:06, Richard Lamboj wrote:

is there a way to get the GUID from a Network Device?


Are you talking about the MAC address? If so, here's
one way:


import wmi

for nic in wmi.WMI ().Win32_NetworkAdapterConfiguration ():
  print nic.caption, "=>", nic.MACAddress



If you're not, then which GUID are you referring to?

TJG
--
http://mail.python.org/mailman/listinfo/python-list


WIN32 - get the GUID of a Network Device

2010-04-26 Thread Richard Lamboj

Hello,

is there a way to get the GUID from a Network Device?

Kind Regard,

Richi
-- 
http://mail.python.org/mailman/listinfo/python-list