Results 1 to 12 of 12

Thread: How to run a bat file in vb

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    How to run a bat file in vb

    ok i want to run a bat file in vb? but how?

  2. #2

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    Re: How to run a bat file in vb

    humm... i mean like i have a window that is like commad prompt so i can see it running

  4. #4

  5. #5

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    Re: How to run a bat file in vb

    no i want to make text1 show what is happening in the cmd window

  7. #7
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: How to run a bat file in vb

    Quote Originally Posted by Gunner54
    humm... i mean like i have a window that is like commad prompt so i can see it running
    The link to the code i gave shows exactly what you're after, but with one difference, that it's now showing what's happening in the cmd window, but by creating proccess and displaying output results

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    Re: How to run a bat file in vb

    that code seems strange... i dont know what i need

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    Re: How to run a bat file in vb

    were do i put my bat file dir

  10. #10
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: How to run a bat file in vb

    You don't need to use the batch file. Type the proccess and click a button - it will show you the output - usage is written in the code.

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    Re: How to run a bat file in vb

    a button called... see i dont know what tools i need i didnt know i needed a button but whats the button called command1 or cmd1 i need a text box too whats that called....

  12. #12
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    372

    Re: How to run a bat file in vb

    do you need to see the text as the batch file runs, or could you get away with just seeing it after it gets done running?
    if you only need it after the fact, it is really easy to get that text.
    just add a ">" to your batch file command line, and specify a textfile name. the output that usually goes to the screen will be redirected to the text file. example:

    'saves your ipconfiguration to textfile - "c:\ip.txt"
    shell ("cmd.exe /c ipconfig > c:\ip.txt")

    once it a text file, you can easily load it intoa textbox. examples abound.

    good luck!

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