For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > November 2004 > command line switches with vb executable









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 command line switches with vb executable
steve

2004-11-29, 8:55 pm

is it possible to add command line switches to a vb executable (e.g.
myprog.exe /xx)? in other words, is it possible to add external switches to
allow a user to turn on or off certain features within the compiled program?

thanks,
steve


Ralph

2004-11-29, 8:55 pm


"steve" <steve@nospam.com> wrote in message
news:ufM4lel1EHA.2824@TK2MSFTNGP09.phx.gbl...
> is it possible to add command line switches to a vb executable (e.g.
> myprog.exe /xx)? in other words, is it possible to add external switches

to
> allow a user to turn on or off certain features within the compiled

program?
>
> thanks,
> steve
>


Yes.

Look up Command$ in the online help.

-ralph


Ken Halter

2004-11-29, 8:55 pm

"steve" <steve@nospam.com> wrote in message
news:ufM4lel1EHA.2824@TK2MSFTNGP09.phx.gbl...
> is it possible to add command line switches to a vb executable (e.g.
> myprog.exe /xx)? in other words, is it possible to add external switches
> to
> allow a user to turn on or off certain features within the compiled
> program?
>
> thanks,
> steve


All 'switches' are available to you via the Command$ keyword. If you start
the app with:

myprog.exe /xx /yy /zz

Command$ will contain "/xx /yy /zz"

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..


YYZ

2004-11-29, 8:55 pm

"steve" <steve@nospam.com> wrote in message
news:ufM4lel1EHA.2824@TK2MSFTNGP09.phx.gbl...
> is it possible to add command line switches to a vb executable (e.g.
> myprog.exe /xx)? in other words, is it possible to add external switches

to
> allow a user to turn on or off certain features within the compiled

program?

Look into Command$ in your help file.

Matt


Sponsored Links







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

Copyright 2008 codecomments.com