Home All Groups Group Topic Archive Search About

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

Author
26 May 2005 11:21 PM
hamil
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?

Author
26 May 2005 11:38 PM
Karl E. Peterson
Try putting "start " in front of "MyProgram"...
--
Working Without a .NET?
http://classicvb.org/petition


hamil wrote:
Show quoteHide quote
> 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?
Author
26 May 2005 11:57 PM
hamil
Perfect!  Thanks

H


Show quoteHide quote
"Karl E. Peterson" wrote:

> 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?
>
>
>
>