P
palouf
Hi to all,
i try to modify my network params dynamically. I can't manage to do it.
does smbdy knows what i'm doing wrong ?
string[] temp = new string[1];
ManagementObjectSearcher ms = new
ManagementObjectSearcher("SELECT * FROM
Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = ms.Get();
foreach(ManagementObject mo in moc)
{
if((string)mo.GetPropertyValue("Description") ==
this.interface)
{
temp[0] = node["ip"].InnerText;
mo.SetPropertyValue("IPAddress",temp);
}
}
and there nothing happened .... no exception raised but no updates of the
netparams has been done
my objective is to change the ip address and the subnetwork mask
Thanks for your help.
Palouf
i try to modify my network params dynamically. I can't manage to do it.
does smbdy knows what i'm doing wrong ?
string[] temp = new string[1];
ManagementObjectSearcher ms = new
ManagementObjectSearcher("SELECT * FROM
Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = ms.Get();
foreach(ManagementObject mo in moc)
{
if((string)mo.GetPropertyValue("Description") ==
this.interface)
{
temp[0] = node["ip"].InnerText;
mo.SetPropertyValue("IPAddress",temp);
}
}
and there nothing happened .... no exception raised but no updates of the
netparams has been done
my objective is to change the ip address and the subnetwork mask
Thanks for your help.
Palouf