How To Connect And Disconnect The Internet Using VB.NET

this is something simple , i have two ways . one is using cmd and the other one is using shell commands but the both are one line code


Connect 

#Method 1

Shell("cmd.exe /c ipconfig/renew")

#Method 2

Shell("NET START DHCP")

Disconnect

#Method 1

Shell("cmd.exe /c ipconfig/release")

#Method 2


Shell("NET STOP DHCP")

you can use them on button click event or some click events 

2 comments

thanks bro, but u have another idea, becoz, in window 7 and window 8 can easily solve that problem , when we disconnect internet,,, they can solve that puzzle by troublshooting ............. any other method to connect and disconnect internet .

Reply

disable the ethernet adapter... haha.. just crazy guess..

Reply

Post a Comment

Note: Only a member of this blog may post a comment.