It seems at least one other person is interested so here's what I found:
As far as I can tell it's a bug in WMI. To get around it, what seems to work is to directly set the appropriate registry values for the adapter. These are stored in the registry under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<guid>
The guid is contained in the IP_ADAPTER_INFO structure filled in by GetAdaptersInfo.
Set the EnableDHCP DWORD value to 1.
I also found it useful to clear the gateways using WMI SetGateways otherwise the old gateway(s) hang around.
I also found that when EnableStatic says it failed, it actually works.
This stuff is only relevant when the network is disconnected.
本文介绍了如何绕过WMI中的一个bug,通过直接设置注册表值来解决适配器相关问题。包括将EnableDHCP DWORD值设置为1,并清除网关以避免旧网关残留。同时指出启用静态配置失败时实际已生效的情况。此方法仅在断开网络时适用。
1307

被折叠的 条评论
为什么被折叠?



