WMI is the way I would go, I haven't translated this to VB.NET, but it
should give you a start:
Function ChangeIpAddress (arrNewIPA, arrSubnetMask, arrGateway, strComputer)
Set objWMIService = GetObject("winm gmts:\\" & strComputer & "\root\cimv 2")
Set colNetAdapters = objWMIService.E xecQuery ("Select * from
Win32_NetworkAd apterConfigurat ion " & "where IPEnabled=TRUE" )
strIPAddress = arrNewIPA
strSubnetMask = arrSubnetMask
strGateway = arrGateway
strGatewayMetri c = Array(1)
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.E nableStatic(str IPAddress, strSubnetMask)
errGateways = objNetAdapter.S etGateways(strG ateway, strGatewaymetri c)
Next
End Function
"Nijazi Halimaji" <sp***@gmx.ne t> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hi
In VB6 i changed the IP-Adress and Gateway of the computer by using API.
Is there an object available in .net for doing this?
Thanks alot
Nijazi Halimaji