Command Line Switches 
Author Message
 Command Line Switches

Hi,

VFP6, sp4

I need to create a shortcut to my vfp6 compiled exe. In my shortcut, I would
like to pass a parameter to the exe. I though I could do the following in
the shortcut's target box:

C:\Common\Utility\RunApp\runapp.exe -ADMIN

In my main program for this exe, I have a PARAMETER statement. Nothing is
being given to my app from the shortcut.

I hope I explained this ok. Thanks for any help on this!

-Tod



Mon, 08 Mar 2004 00:37:54 GMT  
 Command Line Switches
I created a project & prg "test"

param t1

?vartype(t1)
?t1
wait

when run from a dos box:
test -admin
I get as output:
C
admin
Press any key to continue ...

Quote:

>Hi,

>VFP6, sp4

>I need to create a shortcut to my vfp6 compiled exe. In my shortcut, I would
>like to pass a parameter to the exe. I though I could do the following in
>the shortcut's target box:

>C:\Common\Utility\RunApp\runapp.exe -ADMIN

>In my main program for this exe, I have a PARAMETER statement. Nothing is
>being given to my app from the shortcut.

>I hope I explained this ok. Thanks for any help on this!

>-Tod




Mon, 08 Mar 2004 03:03:51 GMT  
 Command Line Switches
Tod,
You probably don't want to include the "-" before your parameter. This
symbol (and the first character past it) is used to pick off parameters for
the VFP runtime. From the help file:

Command-Line Switches
You can add switches to the Visual FoxPro command line to affect how the
program starts.

To use a command-line switch

Add the switch after Vfp6.exe on the command line or in a shortcut.
If the command-line switch includes a file name, do not put any spaces
between the switch and the file name.

Switches
-A

Ignores the default configuration file and Windows registry settings. This
is equivalent to starting Visual FoxPro with the configuration settings it
had when first installed, which can be useful for debugging settings that
might cause Visual FoxPro to start incorrectly.

For details about configuring the Visual FoxPro environment, see Chapter 3,
Configuring Visual FoxPro in the Installation Guide.

-BFileName

Displays your own bitmap when Visual FoxPro is started. If the bitmap you
specify cannot be located, a bitmap isn't displayed when Visual FoxPro is
started. The -b command line switch can also be included in a Visual FoxPro
shortcut:

C:\Program Files\Microsoft Visual ;
Studio\Vfp98\Vfp6.exe -bC:\Mydir\Mybmp.bmp

-CFileName

Specifies a configuration file (including path if necessary) other than the
default (Config.fpw). Create the configuration file using any text editor.

For details about configuring the Visual FoxPro environment, see Chapter 3,
Configuring Visual FoxPro, in the Installation Guide.

For example, to start Visual FoxPro with a custom configuration file, you
would alter the command to something like this:

C:\Program Files\Microsoft Visual ;
Studio\Vfp98\Vfp6.exe -CMYConfig.fpw

-DFileName

Specifies a runtime .DLL file (including path if necessary) other than the
default. Using this switch allows you to try different versions of the
runtime DLL, for example, different releases.

For more information, see "Including a Run-Time Library" in Chapter 27,
Extending Visual FoxPro with External Libraries, in the Programmer's Guide.

-LFileName

Specifies a resource file (including path if necessary) other than the
default. Using this switch allows you to use Visual FoxPro in a language
other than the current language specified by the system.

-R

Refreshes the Windows registry with information about Visual FoxPro, such as
associations for Visual FoxPro files. Using this switch is similar to
double-clicking a .REG file. The -R switch does not update the registry with
settings from the Options dialog.

-T or /nologo

Suppresses the display of the Visual FoxPro sign-on screen (banner).

To start Visual FoxPro without a sign-on screen, use these commands:

C:\Program Files\Microsoft Visual Studio\Vfp98\Vfp6.exe -T
C:\Program Files\Microsoft Visual Studio\Vfp98\Vfp6.exe /nologo

Rick


Quote:
> Hi,

> VFP6, sp4

> I need to create a shortcut to my vfp6 compiled exe. In my shortcut, I
would
> like to pass a parameter to the exe. I though I could do the following in
> the shortcut's target box:

> C:\Common\Utility\RunApp\runapp.exe -ADMIN

> In my main program for this exe, I have a PARAMETER statement. Nothing is
> being given to my app from the shortcut.

> I hope I explained this ok. Thanks for any help on this!

> -Tod




Mon, 08 Mar 2004 03:27:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Command line switch list, FPW/FPD?

2. Trying to use the -L command-line switch

3. Command Line

4. Need Help on compiling FoxPro from the Command Line

5. Foxpro Command Line Args ??

6. command line arguements

7. How are command line parameters passed/used?

8. adding a command line interface to my app...

9. can I use command line to launch internet explorer and open one url each time

10. How to continue command the next line? (-)

11. Passing command line parameters to a VFP EXE

12. vfp6 command line parameters???

 

 
Powered by phpBB® Forum Software