1. How do I get the cmd text into a textbox when executing a batch file?
2. How do I check if the computer is connected to the internet? I want an icon showing if the app is connected or not.
Printable View
1. How do I get the cmd text into a textbox when executing a batch file?
2. How do I check if the computer is connected to the internet? I want an icon showing if the app is connected or not.
1. Check the VB.NET CodeBank. Gigemboy (I believe) has posted an example of redirectling command window output.
:D Check the link in my sig :thumb:
Don't listen to him. He's not the real gigemboy. It's just a phishing scam. :D
Yes, that worked out fine with some minor tweaks.
And how do I check if the computer is connected to the internet?
As for the network connection issue, there is a Win32_NetworkAdapter WMI class you can use to get the adapters, and check for the NetConnectionStatus property for the status of "Connected", however you would also have to check for connected modems as well, which im not too sure of... theres a link in my sig on a WMI example also... just throwing out the first thing that comes to mind....
Doesn't Windows tell the user if it's connected or not? Also, if you're connected to the Internet via a network then all you can really say is whether you're connected to that network. Whether or not that network is connected to the Internet isn't really something that you can say without actually trying to access the Internet, as far as I'm aware.