CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Shell

  1. #1
    Join Date
    Oct 1999
    Posts
    21

    Shell

    How do I use the shell command in VB to ping a computer and redirect the output to a file on my C drive?


    Thanks!


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Shell

    The easiest way would be to create a Batch File and call that from the Shell Command in VB, eg.

    In a "PingIt.bat" Batch File..
    PING %1 > %2

    In VB..
    Shell "C:\PingIt.bat www.codeguru.com C:\PingFile.txt"


    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

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

Featured