Quote Originally Posted by DataMiser View Post
It appears that the code you are looking at would disable your network connection. I suppose that would be ok if you are the only pc on the network or do not need to access any other PC or device on the network.

If you are using a router it may be possible to disconnect your internet connection from the network by talking to the router. I do not know how exactly as I have never looked into it but most routers have a web interface that allows you to start/stop the internet connection, some may even provide an APi to do so.
That is what my router can do. I can talk to my router via code and tell it to do certain things that you would normally do by using the interface and clicking on buttons. You need to understand your router and how to set up a direct link to it and know what messages etc to send to it. Be careful doing this because if you screw up you might wish you hadn't fiddled with it if you don't know how to rest it back to where it was