I create a profile, select a nic card, select to obtain IP from DHCP but it's not correctly enabled. The result of the action will be red outline. What I want to do is in the blue outline. (I'm talking about the image attached)
Here's the code that tries to enable DHCP:
public static void SetDHCP( string nicName )
{
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = mc.GetInstances();
foreach(ManagementObject mo in moc)
{
// Make sure this is a IP enabled device. Not something like memory card or VM Ware
if( (bool)mo["IPEnabled"] )
{
if( mo["Caption"].Equals( nicName ) )
{
ManagementBaseObject newDNS = mo.GetMethodParameters( "SetDNSServerSearchOrder" );
newDNS[ "DNSServerSearchOrder" ] = null;
ManagementBaseObject enableDHCP = mo.InvokeMethod( "EnableDHCP", null, null);
ManagementBaseObject setDNS = mo.InvokeMethod( "SetDNSServerSearchOrder", newDNS, null);
}
}
}
}
Poor UI design is unacceptable from a company the size of MS.
The UI team needs an overhaul.
To whom else might be be having this same issue, I found the following tool that DOES work for this missing setting:
https://www.wintools.info/index.php/advanced-system-font-changer#google_vignette
It's MY computer, and I want to be able to make it look the way I WANT! I OWN IT! NOT MS!
That is Arc System Works who are known for having fantastic visuals. It looks better than any Capcom fighting game involving Marvel, that's for sure. I can't be certain but I believe it might be the first 4v4 standard fighting game? If you mean you are tired of seeing Marvel characters you might have a point.
Question
ProclaimDragon
I was testing SwitchNetConfig (code available at: http://www.codeproject.com/csharp/OazSwitchNetConfig.asp) but it's not working correctly...
I create a profile, select a nic card, select to obtain IP from DHCP but it's not correctly enabled. The result of the action will be red outline. What I want to do is in the blue outline. (I'm talking about the image attached)
Here's the code that tries to enable DHCP:
Link to comment
https://www.neowin.net/forum/topic/515984-c-enabling-dhcp-on-nic-through-wmi/Share on other sites
11 answers to this question
Recommended Posts