DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Location
    Brisbane australia
    Posts
    2

    reading a batch file

    Hi all.

    I'm very new to VB.NET, but an old Java programmer. I'm able to run a batch file from my form, and this batch file runs an executable that was generated by someone else using fortran. This program outputs text to the DOS prompt. In my application, I want to have a progress bar (or something similar) that will output what is getting printed on the DOS prompt.

    So, basically, I'm asking if there is any way of reading what is happening on the batch file/Dos Prompt.

    Thanks for your time.

    Nicky

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    I don't see any way this can be done since the output to the DOS window is being generated by an external application that you have no control over.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Apr 2004
    Location
    Lafayette, LA
    Posts
    200
    Check www.desaware.com. You may be able to intercept the windows messages going to the DOS prompt. I am not sure this is possible, but if anyone knows how to do it from VB, they do.

  4. #4
    Join Date
    Aug 2004
    Location
    Brisbane australia
    Posts
    2
    Rightyo. Thanks for the input.

  5. #5
    Join Date
    Dec 2003
    Location
    Melbourne, Australia
    Posts
    52
    You should be able to do what you want by using the Process class, and using the StandardError and StandardOutput properties to capture the output of your batch file.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links