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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you have 2 Command Line Arguments? 1

Status
Not open for further replies.

jadams0173

Technical User
Feb 18, 2005
1,210
I've used a command line argument before. I have a need for one compliled exe(slave) to be launched from 2 other independent apps I've written in VB6 to do 1 of 3 different things.

I need the slave application to recognize 2 command line arguments, something like LOCAL and DISTRIBUTION. The difference is one is a local report for one user and the other is sent as an e-mail attachment from a scheduled task. The 3rd thing is if nothing is passed in (ie. someone just double clicks the exe) then NOTHING happens.

Any ideas on how to do this?
 
>Start by reminding yourself about Command$ ...

<reading.......>

Ah. So all I have to do is pass the parameter (test.exe myparam) and parse is out of the command$ variable? If the variable is empty then nothing was passed so I would know to not do anything.

Am I on the right path?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top