Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VB exe via a batch file

VB exe via a batch file

VB exe via a batch file

Is there a way to pass a parameter to a vb exe from a shell command / batch file and have the return value show up on the next line of the same command prompt screen that launched the VB exe....

for example, VB code is:

varResult = var1 + var2

When the exe is launched via shell command, the next line should
ask the use tio input a value for var1 followed by asking the user to input value for var2
Displaying the result in the shell window.

RE: VB exe via a batch file

I haven't done this, but you might be able to use the Win32 file functions to write to the stdio file (a reserved file handle). Look in the MSDN for samples on doing this.

Chip H.

RE: VB exe via a batch file

Check the VB 5&6 thread "How to display command line output" dated August 26. The thread fizzled without a good answer but the posts might give you some ideas.

RE: VB exe via a batch file

If I follow you right.
Use a small data file to store a value say "var1" in your case.
Then the first program can read that data file in a timer event every second or so.
So both programs are reading the same data file or writing to it. But each program has to open it read something then close it or the other program will get a error.
you can pass values to any number of programs using this method.
If the data is complicated lots of values use an Access .MDB which is better suited for this.

Hope this helps

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close