For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > May 2005 > Starting a VB6 program with command line args from a bat file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Starting a VB6 program with command line args from a bat file
hamil

2005-05-27, 3:55 am

I have an application where I want to start multiple instances of the same
VB6 program with different command line arguments for each instanciation. I
thought I could write a bat file as follows..

MyProgram "This is the first command line argument"
MyProgram "This is the second command line argument"

However, when the bat file executes, the command line window opens and only
the first program runs. After I exit the first program, the second one
starts. When I exit the second program, the command line window exits.

Is there a way to use a bat file to start both programs and then have the
command line window close? If the bat approach wont work, is there another
simple way?


Karl E. Peterson

2005-05-27, 3:55 am

Try putting "start " in front of "MyProgram"...
--
Working Without a .NET?
http://classicvb.org/petition


hamil wrote:
> I have an application where I want to start multiple instances of the
> same VB6 program with different command line arguments for each
> instanciation. I thought I could write a bat file as follows..
>
> MyProgram "This is the first command line argument"
> MyProgram "This is the second command line argument"
>
> However, when the bat file executes, the command line window opens
> and only the first program runs. After I exit the first program, the
> second one starts. When I exit the second program, the command line
> window exits.
>
> Is there a way to use a bat file to start both programs and then have
> the command line window close? If the bat approach wont work, is
> there another simple way?




hamil

2005-05-27, 3:55 am

Perfect! Thanks

H


"Karl E. Peterson" wrote:

> Try putting "start " in front of "MyProgram"...
> --
> Working Without a .NET?
> http://classicvb.org/petition
>
>
> hamil wrote:
>
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com