----------------------------------------------------
FOXPRO COMMAND-LINE OPTIONS (UNDOCUMENTED)
January 2026
----------------------------------------------------
CCB
1. THE COMMAND-LINE OPTIONS (from dv_foxhelp9.chm):
Visual FoxPro Advanced (10.0.0.0) Language Reference.
How to Use Command-Line Options When Starting Visual FoxPro
In addition to using the SET command and a configuration file, you can specify startup options by including
a command-line switch. For example, using command-line options, you can suppress the display of the Visual
FoxPro splash screen, which displays at the startup of Visual FoxPro, or specify a nondefault configuration
file.
To use a command-line switch:
On the command line or in a shortcut, add the switch after the name of the Visual FoxPro executable file,
VFPVersionNumber.exe where VersionNumber represents the version number of this release or any Visual
FoxPro-created .exe file.
Note:
If the command-line switch requires arguments, such as a file name, do not put a space between the switch
and the argument. For example, to specify a configuration file, use a command such as:
"C:\Program Files\Microsoft Visual FoxPro VersionNumber\VFPVersionNumber.exe" -CC:\MYAPP.FPW
Separate multiple options with single spaces.
The following table lists the command-line switches available in Visual FoxPro:
---------------------------------------------------------------------------------------------------------------
| Switch | Description |
---------------------------------------------------------------------------------------------------------------
| -A | Ignore the default configuration file and Windows registry settings. |
| | The command-line switch has been removed in Visual FoxPro Advanced runtime. |
---------------------------------------------------------------------------------------------------------------
| -AUTOMATION | Run as a COM server program. |
---------------------------------------------------------------------------------------------------------------
| -BFileName,Duration | Display a custom bitmap (.bmp), .gif, or .jpg graphic file and specify its display |
| | duration in milliseconds when Visual FoxPro starts. You can also include the -B |
| | command-line switch in a Visual FoxPro shortcut. If the bitmap you specify cannot |
| | be located,the bitmap does not display when Visual FoxPro starts. |
---------------------------------------------------------------------------------------------------------------
| -CFileName | Specify a configuration file, including a path if necessary, other than the default |
| | file, Config.fpw. |
---------------------------------------------------------------------------------------------------------------
| -DFileName | In earlier versions, specify a runtime support library file. |
| | The command-line switch has been removed in Visual FoxPro Advanced. |
---------------------------------------------------------------------------------------------------------------
| -E | In earlier versions, prevent use of all expanded memory. |
| | The command-line switch has been removed in Visual FoxPro Advanced. |
---------------------------------------------------------------------------------------------------------------
| -EMBEDDING | The command-line switch is the same as the command-line switch -AUTOMATION, run as |
| | a COM server program. |
---------------------------------------------------------------------------------------------------------------
| -K | In earlier versions, prevent attempts to use F11 or F12. |
| | The command-line switch has been removed in Visual FoxPro Advanced. |
---------------------------------------------------------------------------------------------------------------
| -LFileName | Specify a resource file, including a path if necessary, other than the default, |
| | vfp*ENU.dll, so you can use Visual FoxPro in a language other than the current |
| | language specified by Windows. |
| | Specify a runtime support library file in Visual FoxPro Advanced. |
---------------------------------------------------------------------------------------------------------------
| -NOLOGO | The command-line switch is the same as the command-line switch -T, suppress the |
| | display of the Visual FoxPro splash screen. |
---------------------------------------------------------------------------------------------------------------
| -R | In earlier versions, refresh the Windows registry with information about Visual |
| | FoxPro, such as associations for Visual FoxPro files. In later versions, use the |
| | command-line switch /regserver. |
| | The command-line switch has been removed in Visual FoxPro 6.0 and later. |
---------------------------------------------------------------------------------------------------------------
| -REGSERVER | Register Visual FoxPro default registry keys. |
| | REGSVR32 server.dll: Register a .dll component. |
---------------------------------------------------------------------------------------------------------------
| -SHELL | In earlier versions, open or run the file with Visual FoxPro. |
| | In Visual FoxPro Advanced, the command-line switch is the same as the command-line |
| | switch -SHELLOPEN, open the file with Visual FoxPro. |
---------------------------------------------------------------------------------------------------------------
| -SHELLOPEN | Open the file with Visual FoxPro. Available in Visual FoxPro 7.0 and later. |
---------------------------------------------------------------------------------------------------------------
| -SHELLPRINT | Print the file with Visual FoxPro. Available in Visual FoxPro 7.0 and later. |
---------------------------------------------------------------------------------------------------------------
| -SHELLPRINTTO | Print the file with Visual FoxPro. Available in Visual FoxPro 7.0 and later. |
---------------------------------------------------------------------------------------------------------------
| -SHELLRUN | Run the file with Visual FoxPro. Available in Visual FoxPro 7.0 and later. |
---------------------------------------------------------------------------------------------------------------
| -T | Suppress the display of the Visual FoxPro splash screen. By default, when Visual |
| | FoxPro starts, it displays a splash screen that shows the Visual FoxPro logo, |
| | version number, and other information. If you prefer that users of your application |
| | not see this splash screen, you can prevent Visual FoxPro from displaying it using |
| | the -T command-line switch. |
| | The command-line switch has been removed in Visual FoxPro Advanced runtime. |
---------------------------------------------------------------------------------------------------------------
| -UNREGSERVER | Remove Visual FoxPro default registry keys. |
| | REGSVR32 /u server.dll: Remove a .dll component. |
---------------------------------------------------------------------------------------------------------------
| /? | List the available command-line arguments. Available in Visual FoxPro 7.0 and later. |
---------------------------------------------------------------------------------------------------------------
For the command-line:
"X:\Myapp\my.exe" 1234 "two items" 12/25/2002 .T.
It will be converted to the Visual FoxPro command:
DO "X:\Myapp\my.exe" WITH "1234", "two items", "12/25/2002", ".T."
In Visual FoxPro 9.0 and earlier versions, the command-line options can only use <= 255 bytes.
In Visual FoxPro Advanced, the command-line options can use <= 8191 bytes.
In Visual FoxPro 9.0 and earlier versions, we don't recommend to use the following command-lines to pass parameters:
"X:\Myapp\my.exe" /Asomestring && reserved for Visual FoxPro
"X:\Myapp\my.exe" /Bsomestring && reserved for Visual FoxPro
"X:\Myapp\my.exe" /Csomestring && reserved for Visual FoxPro
"X:\Myapp\my.exe" /Dsomestring && reserved for Visual FoxPro
"X:\Myapp\my.exe" /Esomestring && reserved for Visual FoxPro
"X:\Myapp\my.exe" /Lsomestring && reserved for Visual FoxPro
"X:\Myapp\my.exe" /Tsomestring && reserved for Visual FoxPro
In Visual FoxPro Advanced, we don't recommend to use the following command-lines to pass parameters:
"X:\Myapp\my.exe" /Bsomestring && reserved for Visual FoxPro Advanced
"X:\Myapp\my.exe" /Csomestring && reserved for Visual FoxPro Advanced
"X:\Myapp\my.exe" /Lsomestring && reserved for Visual FoxPro Advanced
2. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix82.asp
2, microsoft.com:
https://social.msdn.microsoft.com/Forums/en-US/feeea559-4183-4fed-9081-3879e0d087de/command-line-parameters-length-limitation
3, tek-tips.com:
https://www.tek-tips.com/viewthread.cfm?qid=1062921
https://www.tek-tips.com/viewthread.cfm?qid=1752644
4, berezniker.com:
https://www.berezniker.com/content/pages/visual-foxpro/how-pass-parameters-vfp-exe
5, foxite.com:
https://www.foxite.com/archives/how-to-get-a-foxpro-apps-command-line-0000076805.htm
6, devx.com:
http://www.devx.com/tips/Tip/26194
7, computer-programming-forum.com:
http://computer-programming-forum.com/2-vfp/f327d708fa9bbb59.htm
http://computer-programming-forum.com/2-vfp/b1212bd705b10be6.htm
3. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|