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("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery ("Select * from
Win32_NetworkAdapterConfiguration " & "where IPEnabled=TRUE")
strIPAddress = arrNewIPA
strSubnetMask = arrSubnetMask
strGateway = arrGateway
strGatewayMetric = Array(1)
For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
Next
End Function
"Nijazi Halimaji" <sp***@gmx.net> wrote in message
news:%2****************@TK2MSFTNGP12.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