none
How to change TCP/IP settings on a diabled NIC RRS feed

  • Question

  • I am looking for a method (other than directly modifying the NIC interface registry settings) to modify the TCP/IP settings of a disabled NIC. I have some WMI code that works OK with the NIC enabled but does not work when the NIC is disabled. I have also looked at netsh without success. Any suggestions would be appreciated.

    oregonduckman

    Sunday, July 22, 2012 7:52 PM

All replies

  • Can you explain why you want to do this with the NIC disabled?

    How about enable, change, diable?

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET

    Sunday, July 22, 2012 8:34 PM
    Moderator
  • Hi,

    I also suggest to follow Sean's suggestion - that the more easy way.

    Regardless of this: The settings are located at KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\{some GUID}. But note that changes to this keys will not immediately take effect.

    Regards,
    Willi K.

    Thursday, July 26, 2012 7:24 AM
  • The registry approach is not as simple as it looks and has side effects especially when switching from DHCP to a static IP address. The registry entries for static IP addresses are a subset of DHCP and if you don't create them correctly will crash the NIC driver. I am looking for a way to do this programmatically that does not include directly changing the registry entries. 

    oregonduckman

    Thursday, July 26, 2012 4:12 PM