Click here to Skip to main content
15,921,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i change my local ip address using vb.net
Posted

 
Share this answer
 
Try this to set static ip address

VB
System.Diagonistic.Process.Start("netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1")

'Local Area Connection is the name of the connection substitute this with the correct one. 

'To set to DHCP
System.Diagonistic.Process.Start("netsh interface ip set address "Local Area Connection" dhcp")



To set to DHCP
 
Share this answer
 
Comments
Manfred Rudolf Bihy 24-Aug-12 9:48am    
You need to escape the double quotes that occurr within your strings!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900