Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling EXE with command line parameters

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
571
US
Colleagues,
I'm working on a project where a "Manager" program (will be EXE) calls multiple copies of the "Worker" program (also EXEs) with parameters.
The template in the Manager.EXE is this:

Code:
Process.Start(lcWorkerEXE, lcParmsString)

Where the Worker.EXE program picks up these parameters?
My guess it's in Main(), e.g.

Code:
Sub Main(Parm1, Parm2, ..., Parm6)

The question is: shall it be as it's shown above, or

Code:
Sub Main(ByVal Parm1 As String, ByVal Parm2 As String, ..., ByVal Parm6 As String)

Please advise.
TIA!

Regards,

Ilya
 
Nah - just use the [tt]Command[/tt] function (pretty much just like VB6) or the [tt]System.Environment.GetCommandLineArgs[/tt] method
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top