Results 1 to 7 of 7

Thread: Need help with batch and networking

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    35

    Need help with batch and networking

    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.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Need help with batch and networking

    1. Check the VB.NET CodeBank. Gigemboy (I believe) has posted an example of redirectling command window output.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: Need help with batch and networking

    Check the link in my sig
    Last edited by gigemboy; Feb 27th, 2006 at 08:50 AM.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Need help with batch and networking

    Don't listen to him. He's not the real gigemboy. It's just a phishing scam.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    35

    Re: Need help with batch and networking

    Yes, that worked out fine with some minor tweaks.

    And how do I check if the computer is connected to the internet?

  6. #6
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: Need help with batch and networking

    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....
    Last edited by gigemboy; Feb 27th, 2006 at 08:54 AM.

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Need help with batch and networking

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width